Enable install script to be automated

Added a script parameter to control the systemd service installation step
This commit is contained in:
Khaos
2024-12-28 20:24:57 +01:00
parent 053b20f19c
commit 45ea68bbc0

View File

@@ -202,8 +202,15 @@ chmod +x scripts/*.sh
#
# Install systemd service
#
echo -e "${CYAN}Do you want to install Spoolman as a systemd service? This will automatically start Spoolman when your server starts. (y/n)${NC}"
read choice
systemd_option=$1
if [ "$systemd_option" == "-systemd=no" ]; then
choice="n"
elif [ "$systemd_option" == "-systemd=yes" ]; then
choice="y"
else
echo -e "${CYAN}Do you want to install Spoolman as a systemd service? This will automatically start Spoolman when your server starts. (y/n)${NC}"
read choice
fi
if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then
systemd_user_dir="$HOME/.config/systemd/user"