Enable install script to be automated
Added a script parameter to control the systemd service installation step
This commit is contained in:
@@ -202,8 +202,15 @@ chmod +x scripts/*.sh
|
|||||||
#
|
#
|
||||||
# Install systemd service
|
# 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}"
|
systemd_option=$1
|
||||||
read choice
|
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
|
if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then
|
||||||
systemd_user_dir="$HOME/.config/systemd/user"
|
systemd_user_dir="$HOME/.config/systemd/user"
|
||||||
|
|||||||
Reference in New Issue
Block a user