fix: use built-in systemd installer
This commit is contained in:
parent
5d189e5d60
commit
dfe9980f09
@ -46,7 +46,6 @@ function update_script() {
|
|||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
wget -q https://fileflows.com/downloads/zip -O $temp_file
|
wget -q https://fileflows.com/downloads/zip -O $temp_file
|
||||||
unzip -oq -d /opt/fileflows $temp_file
|
unzip -oq -d /opt/fileflows $temp_file
|
||||||
chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh
|
|
||||||
msg_ok "Updated $APP to latest version"
|
msg_ok "Updated $APP to latest version"
|
||||||
|
|
||||||
# Starting Services
|
# Starting Services
|
||||||
|
@ -60,26 +60,12 @@ msg_info "Setup ${APPLICATION}"
|
|||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
wget -q https://fileflows.com/downloads/zip -O $temp_file
|
wget -q https://fileflows.com/downloads/zip -O $temp_file
|
||||||
unzip -q -d /opt/fileflows $temp_file
|
unzip -q -d /opt/fileflows $temp_file
|
||||||
chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh
|
(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
|
||||||
msg_ok "Setup ${APPLICATION}"
|
msg_ok "Setup ${APPLICATION}"
|
||||||
|
|
||||||
# Creating Service
|
# Creating Service
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/fileflows.service
|
(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
|
||||||
[Unit]
|
|
||||||
Description=${APPLICATION} Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
WorkingDirectory=/opt/fileflows
|
|
||||||
ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh
|
|
||||||
SyslogIdentifier=FileFlows
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now fileflows.service
|
systemctl enable -q --now fileflows.service
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user