- Strip README to essentials with wiki references only - Remove non-existent API docs and troubleshooting links - Focus on quick start and actual integrations (merkwerk) - Remove FreeBSD support from all installation scripts - Clean up platform detection logic in scripts - Maintain OpenBSD and Linux support only Reduces maintenance burden and aligns with actual project scope.
41 lines
1.2 KiB
Bash
Executable file
41 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
# scripts/create-service.sh - Create system service for furt using repository templates
|
|
|
|
set -e
|
|
|
|
# Check if we're in furt source directory
|
|
if [ ! -d "deployment" ]; then
|
|
echo "Error: deployment/ directory not found - not in furt source directory?"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$(uname)" = "OpenBSD" ]; then
|
|
# Use OpenBSD rc.d template from repository
|
|
if [ ! -f "deployment/openbsd/rc.d-furt" ]; then
|
|
echo "Error: deployment/openbsd/rc.d-furt template not found"
|
|
exit 1
|
|
fi
|
|
|
|
cp deployment/openbsd/rc.d-furt /etc/rc.d/furt
|
|
chmod +x /etc/rc.d/furt
|
|
echo "furt_flags=" >> /etc/rc.conf.local
|
|
rcctl enable furt
|
|
echo "OpenBSD service created and enabled using repository template"
|
|
|
|
elif [ "$(uname)" = "Linux" ]; then
|
|
# Use systemd template from repository
|
|
if [ ! -f "deployment/linux/furt.service" ]; then
|
|
echo "Error: deployment/linux/furt.service template not found"
|
|
exit 1
|
|
fi
|
|
|
|
cp deployment/linux/furt.service /etc/systemd/system/
|
|
systemctl daemon-reload
|
|
systemctl enable furt
|
|
echo "Linux systemd service created and enabled using repository template"
|
|
|
|
else
|
|
echo "Unsupported operating system for service creation"
|
|
exit 1
|
|
fi
|
|
|