Skip to content

Commit

Permalink
gracefully handle systemctl
Browse files Browse the repository at this point in the history
  • Loading branch information
jancajthaml committed Aug 22, 2019
1 parent 32ebeb2 commit a21a012
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions packaging/debian_amd64/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ case "$1" in
enable vault-rest.service

if [ ${SYSTEMD_AVAIL} ] ; then
systemctl daemon-reload
systemctl start vault.service
systemctl start vault.path
(systemctl daemon-reload || :)
(systemctl start vault.service || :)
(systemctl start vault.path || :)
fi

else
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian_amd64/DEBIAN/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ case "$1" in

upgrade|deconfigure)
if [ ${SYSTEMD_AVAIL} ] ; then
systemctl stop vault 2> /dev/null || :
(systemctl stop vault 2> /dev/null || :)
fi
;;

Expand Down
6 changes: 3 additions & 3 deletions packaging/debian_arm64/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ case "$1" in
enable vault-rest.service

if [ ${SYSTEMD_AVAIL} ] ; then
systemctl daemon-reload
systemctl start vault.service
systemctl start vault.path
(systemctl daemon-reload || :)
(systemctl start vault.service || :)
(systemctl start vault.path || :)
fi

else
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian_arm64/DEBIAN/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ case "$1" in

upgrade|deconfigure)
if [ ${SYSTEMD_AVAIL} ] ; then
systemctl stop vault 2> /dev/null || :
(systemctl stop vault 2> /dev/null || :)
fi
;;

Expand Down
6 changes: 3 additions & 3 deletions packaging/debian_armhf/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ case "$1" in
enable vault-rest.service

if [ ${SYSTEMD_AVAIL} ] ; then
systemctl daemon-reload
systemctl start vault.service
systemctl start vault.path
(systemctl daemon-reload || :)
(systemctl start vault.service || :)
(systemctl start vault.path || :)
fi

else
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian_armhf/DEBIAN/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ case "$1" in

upgrade|deconfigure)
if [ ${SYSTEMD_AVAIL} ] ; then
systemctl stop vault 2> /dev/null || :
(systemctl stop vault 2> /dev/null || :)
fi
;;

Expand Down

0 comments on commit a21a012

Please sign in to comment.