Skip to content

Commit

Permalink
Don't restart rippled during apt upgrade:
Browse files Browse the repository at this point in the history
Resolves #3294
  • Loading branch information
legleux committed Sep 10, 2021
1 parent d92624d commit d402b6a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Builds/containers/packaging/dpkg/debian/rippled.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ case "$1" in
chmod 644 /opt/ripple/etc/update-rippled-cron
chmod 644 /etc/logrotate.d/rippled
chown -R root:$GROUP_NAME /opt/ripple/etc/update-rippled-cron
init_is_systemd=$(echo $(readlink $(ps -o command 1 | sed -n 2p)))
if ! [ $(expr "$init_is_systemd" : '.*systemd.*') -eq 0 ] > /dev/null 2>&1 && $(! ps -A -o command | grep "^/opt/ripple/bin/${rippled}" > /dev/null 2>&1) ; then
systemctl start rippled
fi
;;

abort-upgrade|abort-remove|abort-deconfigure)
Expand Down
7 changes: 6 additions & 1 deletion Builds/containers/packaging/dpkg/debian/rippled.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
set -e

case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

remove)
if ps -A -o command | grep "^/opt/ripple/bin/rippled" > /dev/null 2>&1 ; then
systemctl stop rippled
fi
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
Expand Down
2 changes: 2 additions & 0 deletions Builds/containers/packaging/dpkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export CXXFLAGS:=$(subst -Werror=format-security,,$(CXXFLAGS))

%:
dh $@ --with systemd

override_dh_systemd_start:
dh_systemd_start --no-restart-on-upgrade

override_dh_auto_configure:
env
Expand Down

0 comments on commit d402b6a

Please sign in to comment.