This commit is contained in:
Tiger Wang 2022-10-12 16:12:14 -04:00
parent 0f3d3e82f5
commit b61a3db611

View File

@ -31,15 +31,10 @@ if [ ! -f "${CONF_FILE}" ]; then
cp -v "${CONF_FILE_SAMPLE}" "${CONF_FILE}" cp -v "${CONF_FILE_SAMPLE}" "${CONF_FILE}"
fi fi
if systemctl is-active "${APP_NAME}.service" &>/dev/null ;then rm -rf /etc/systemd/system/casaos.service # remove old service file
echo "server started"
else
# enable and start service
systemctl daemon-reload
echo "Enabling service..." systemctl daemon-reload
systemctl enable --force --no-ask-password "${APP_NAME}.service"
#echo "Starting service..." # enable service (without starting)
#systemctl start --force --no-ask-password "${APP_NAME}.service" echo "Enabling service..."
fi systemctl enable --force --no-ask-password "${APP_NAME}.service"