Skip to content

Commit 15e9148

Browse files
committed
fix: stop HAS with systemctl if service unit installed
1 parent d9339fb commit 15e9148

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/configure-auth-service.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,11 @@ function restart_service() {
914914
PM2_USER=${SUDO_USER:-${USER}}
915915
sudo -u $PM2_USER pm2 delete ecosystem.config.js
916916
sudo -u $PM2_USER pm2 save
917-
elif [[ -f /etc/systemd/system/helix-auth.service ]]; then
917+
fi
918+
# Just in case pm2 was installed but not being used to manage the HAS
919+
# process, also try stopping HAS using systemctl if the service unit is
920+
# present.
921+
if [[ -f /etc/systemd/system/helix-auth.service ]]; then
918922
sudo systemctl stop helix-auth
919923
fi
920924
set -e

0 commit comments

Comments
 (0)