This commit is contained in:
CanbiZ 2025-12-09 13:04:39 +01:00
parent b668e1b7d3
commit e0796be160
2 changed files with 4 additions and 23 deletions

View File

@ -31,7 +31,7 @@ function update_script() {
if check_for_gh_release "invoiceninja" "invoiceninja/invoiceninja"; then if check_for_gh_release "invoiceninja" "invoiceninja/invoiceninja"; then
msg_info "Stopping Services" msg_info "Stopping Services"
systemctl stop invoiceninja-worker nginx php8.4-fpm systemctl stop supervisor nginx php8.4-fpm
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Creating Backup" msg_info "Creating Backup"
@ -39,7 +39,7 @@ function update_script() {
cp -r /opt/invoiceninja/public/storage /tmp/invoiceninja_storage.bak 2>/dev/null || true cp -r /opt/invoiceninja/public/storage /tmp/invoiceninja_storage.bak 2>/dev/null || true
msg_ok "Created Backup" msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz"
msg_info "Restoring Configuration" msg_info "Restoring Configuration"
cp /tmp/invoiceninja_env.bak /opt/invoiceninja/.env cp /tmp/invoiceninja_env.bak /opt/invoiceninja/.env
@ -55,7 +55,7 @@ function update_script() {
msg_ok "Ran Migrations" msg_ok "Ran Migrations"
msg_info "Starting Services" msg_info "Starting Services"
systemctl start php8.4-fpm nginx invoiceninja-worker systemctl start php8.4-fpm nginx supervisor
msg_ok "Started Services" msg_ok "Started Services"
msg_ok "Updated Successfully" msg_ok "Updated Successfully"

View File

@ -152,27 +152,8 @@ cat <<'EOF' >/etc/cron.d/invoiceninja
EOF EOF
msg_ok "Set up Cron" msg_ok "Set up Cron"
msg_info "Creating Service"
cat <<'EOF' >/etc/systemd/system/invoiceninja-worker.service
[Unit]
Description=InvoiceNinja Queue Worker (via Supervisor)
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl stop all
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
msg_ok "Created Service"
msg_info "Enabling Services" msg_info "Enabling Services"
systemctl enable -q --now php8.4-fpm nginx supervisor invoiceninja-worker systemctl enable -q --now php8.4-fpm nginx supervisor
msg_ok "Enabled Services" msg_ok "Enabled Services"
motd_ssh motd_ssh