diff options
Diffstat (limited to 'warsaw-bin.install')
-rw-r--r-- | warsaw-bin.install | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/warsaw-bin.install b/warsaw-bin.install index 233897c8e00e..156e60574ffa 100644 --- a/warsaw-bin.install +++ b/warsaw-bin.install @@ -17,27 +17,21 @@ post_install() { fi } -pre_remove() { - if command -v systemctl > /dev/null 2>&1; then - systemctl stop warsaw.service - fi - - if command -v warsaw > /dev/null 2>&1; then - warsaw stop +post_upgrade() { + if systemctl is-active warsaw.service 1>/dev/null; then + systemctl daemon-reload + systemctl restart warsaw.service fi +} - if command -v systemctl > /dev/null 2>&1; then - systemctl disable warsaw.service - systemctl daemon-reload +pre_remove() { + if systemctl is-enabled warsaw.service 1>/dev/null; then + systemctl disable --now warsaw.service fi } post_remove() { - if command -v rm > /dev/null 2>&1; then - rm -rf /usr/local/etc/warsaw - fi - - if command -v pkill > /dev/null 2>&1; then - pkill wsatspi + if [ -e "/usr/local/etc/warsaw" ]; then + rm -rf /usr/local/etc/warsaw fi } |