summarylogtreecommitdiffstats
path: root/warsaw-bin.install
diff options
context:
space:
mode:
authortioguda2021-07-07 05:05:29 -0300
committertioguda2021-07-07 05:05:29 -0300
commite46d402d6ce8181fad91a62443f559d8a5e9be01 (patch)
tree8f3d92e9fb822be3c462aca85f0d87bfc089105c /warsaw-bin.install
parent5c0469658678dfba348118bd2c8bd0754057540c (diff)
downloadaur-e46d402d6ce8181fad91a62443f559d8a5e9be01.tar.gz
Update
Diffstat (limited to 'warsaw-bin.install')
-rw-r--r--warsaw-bin.install26
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
}