diff options
author | aimileus | 2018-01-08 06:57:51 +0100 |
---|---|---|
committer | aimileus | 2018-01-08 06:58:53 +0100 |
commit | 574ee395f58c63c5dcf15e8593146f6df85d3eff (patch) | |
tree | 8b695d8bd3c215c09f8feca683324b19d153bc05 /snapd.install | |
parent | 53385e4838a91c232ab9ef9bf309823494dc00fa (diff) | |
download | aur-574ee395f58c63c5dcf15e8593146f6df85d3eff.tar.gz |
snapd - add install file from upstream/snapd-git
Diffstat (limited to 'snapd.install')
-rw-r--r-- | snapd.install | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/snapd.install b/snapd.install new file mode 100644 index 000000000000..7260288546a1 --- /dev/null +++ b/snapd.install @@ -0,0 +1,33 @@ +_stop_services() { + /usr/bin/systemctl stop \ + snapd.service \ + snapd.socket \ + snapd.refresh.timer \ + snapd.refresh.service > /dev/null 2>&1 +} + +pre_remove() { + _stop_services + + /usr/lib/snapd/snap-mgmt --purge || : +} + +pre_upgrade() { + _stop_services +} + +post_upgrade() { + /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : + + # restore the services after an upgrade + if /usr/bin/systemctl -q is-enabled snapd.socket > /dev/null 2>&1; +then + /usr/bin/systemctl start snapd.socket > /dev/null 2>&1 || : + fi + if systemctl -q is-enabled snapd.refresh.timer > /dev/null 2>&1; then + systemctl start snapd.refresh.timer > /dev/null 2>&1 || : + fi +} + +# vim:set ts=2 sw=2 et: + |