Skip to content

Commit 226a5bc

Browse files
authored
Pulse: standardise install/update with Pulse repo script (#7519)
- revert the pulse => pulse-backend service name change - remove message about older installs - symlink pulse binary to /usr/local/bin
1 parent ffd2ed0 commit 226a5bc

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

ct/pulse.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ function update_script() {
2828
exit
2929
fi
3030

31-
if [[ ! -f ~/.pulse ]]; then
32-
msg_error "Old Installation Found! Please recreate the container due big changes in the software."
33-
exit 1
34-
fi
3531
if check_for_gh_release "pulse" "rcourtman/Pulse"; then
3632
SERVICE_PATH="/etc/systemd/system"
3733
msg_info "Stopping Services"
@@ -43,19 +39,20 @@ function update_script() {
4339
fi
4440

4541
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
42+
ln -sf /opt/pulse/bin/pulse /usr/local/bin/pulse
4643
chown -R pulse:pulse /etc/pulse /opt/pulse
47-
if [[ -f "$SERVICE_PATH"/pulse.service ]]; then
48-
mv "$SERVICE_PATH"/pulse.service "$SERVICE_PATH"/pulse-backend.service
44+
if [[ -f "$SERVICE_PATH"/pulse-backend.service ]]; then
45+
mv "$SERVICE_PATH"/pulse-backend.service "$SERVICE_PATH"/pulse.service
4946
fi
5047
sed -i -e 's|pulse/pulse|pulse/bin/pulse|' \
51-
-e 's/^Environment="API.*$//' "$SERVICE_PATH"/pulse-backend.service
48+
-e 's/^Environment="API.*$//' "$SERVICE_PATH"/pulse.service
5249
systemctl daemon-reload
5350
if grep -q 'pulse-home:/bin/bash' /etc/passwd; then
5451
usermod -s /usr/sbin/nologin pulse
5552
fi
5653

5754
msg_info "Starting Services"
58-
systemctl start pulse-backend
55+
systemctl start pulse
5956
msg_ok "Started Services"
6057
msg_ok "Updated Successfully"
6158
fi

install/pulse-install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ fi
3030

3131
mkdir -p /etc/pulse
3232
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
33+
ln -sf /opt/pulse/bin/pulse /usr/local/bin/pulse
3334
chown -R pulse:pulse /etc/pulse /opt/pulse
3435
msg_ok "Installed Pulse"
3536

3637
msg_info "Creating Service"
37-
cat <<EOF >/etc/systemd/system/pulse-backend.service
38+
cat <<EOF >/etc/systemd/system/pulse.service
3839
[Unit]
3940
Description=Pulse Monitoring Server
4041
After=network.target
@@ -55,7 +56,7 @@ Environment="PULSE_DATA_DIR=/etc/pulse"
5556
[Install]
5657
WantedBy=multi-user.target
5758
EOF
58-
systemctl enable -q --now pulse-backend
59+
systemctl enable -q --now pulse
5960
msg_ok "Created Service"
6061

6162
motd_ssh

0 commit comments

Comments
 (0)