diff options
author | tioguda | 2021-07-07 05:05:29 -0300 |
---|---|---|
committer | tioguda | 2021-07-07 05:05:29 -0300 |
commit | e46d402d6ce8181fad91a62443f559d8a5e9be01 (patch) | |
tree | 8f3d92e9fb822be3c462aca85f0d87bfc089105c /warsaw-bin.install | |
parent | 5c0469658678dfba348118bd2c8bd0754057540c (diff) | |
download | aur-e46d402d6ce8181fad91a62443f559d8a5e9be01.tar.gz |
Update
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 } |