From 7bc97edce6f76e253ee4557ce25e06dbf8a9276c Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sun, 21 Dec 2025 22:59:32 +0100 Subject: [PATCH] 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 --- ct/jotty.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ct/jotty.sh b/ct/jotty.sh index f2a0e01e9..573140074 100644 --- a/ct/jotty.sh +++ b/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 </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"