mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-22 15:06:25 +01:00
Update systemd service in jotty update script
- Recreate systemd service file with correct ExecStart command - Change from 'yarn start' to '/usr/bin/node server.js' - Ensures old installations get updated service configuration - Run daemon-reload after service file update
This commit is contained in:
18
ct/jotty.sh
18
ct/jotty.sh
@ -66,6 +66,24 @@ function update_script() {
|
||||
$STD tar -xf /opt/data_config.tar
|
||||
msg_ok "Restored configuration & data"
|
||||
|
||||
msg_info "Updating Service"
|
||||
cat <<EOF >/etc/systemd/system/jotty.service
|
||||
[Unit]
|
||||
Description=jotty server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/jotty
|
||||
EnvironmentFile=/opt/jotty/.env
|
||||
ExecStart=/usr/bin/node server.js
|
||||
Restart=on-abnormal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
msg_ok "Updated Service"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start jotty
|
||||
msg_ok "Started Service"
|
||||
|
||||
Reference in New Issue
Block a user