Skip to content

Commit d402b6a

Browse files
committed
Don't restart rippled during apt upgrade:
Resolves XRPLF#3294
1 parent d92624d commit d402b6a

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Builds/containers/packaging/dpkg/debian/rippled.postinst

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ case "$1" in
1818
chmod 644 /opt/ripple/etc/update-rippled-cron
1919
chmod 644 /etc/logrotate.d/rippled
2020
chown -R root:$GROUP_NAME /opt/ripple/etc/update-rippled-cron
21+
init_is_systemd=$(echo $(readlink $(ps -o command 1 | sed -n 2p)))
22+
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
23+
systemctl start rippled
24+
fi
2125
;;
2226

2327
abort-upgrade|abort-remove|abort-deconfigure)

Builds/containers/packaging/dpkg/debian/rippled.postrm

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
set -e
33

44
case "$1" in
5-
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
5+
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
66
;;
77

8+
remove)
9+
if ps -A -o command | grep "^/opt/ripple/bin/rippled" > /dev/null 2>&1 ; then
10+
systemctl stop rippled
11+
fi
12+
;;
813
*)
914
echo "postrm called with unknown argument \`$1'" >&2
1015
exit 1

Builds/containers/packaging/dpkg/debian/rules

+2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export CXXFLAGS:=$(subst -Werror=format-security,,$(CXXFLAGS))
1010

1111
%:
1212
dh $@ --with systemd
13+
1314
override_dh_systemd_start:
15+
dh_systemd_start --no-restart-on-upgrade
1416

1517
override_dh_auto_configure:
1618
env

0 commit comments

Comments
 (0)