github.com/meulengracht/snapd@v0.0.0-20210719210640-8bde69bcc84e/packaging/arch/snapd.install (about) 1 ## arg 1: the new package version 2 post_install() { 3 echo 4 echo 'To use snapd start/enable the snapd.socket' 5 echo 6 echo 'If you want your apps to be automatically updated' 7 echo 'from the store start/enable the snapd.service' 8 echo 9 echo 'NOTE: Desktop entries show up after logging in again' 10 echo ' or rebooting after snapd installation' 11 echo 12 echo 'For more informations, see https://wiki.archlinux.org/index.php/Snapd' 13 } 14 15 _systemctl_do_for_all() { 16 /usr/bin/systemctl "$@" \ 17 snapd.service \ 18 snapd.socket > /dev/null 2>&1 19 } 20 21 _stop_services() { 22 _systemctl_do_for_all stop 23 } 24 25 _disable_services() { 26 _systemctl_do_for_all --no-reload disable 27 } 28 29 pre_remove() { 30 _stop_services 31 _disable_services 32 33 /usr/lib/snapd/snap-mgmt --purge || : 34 } 35 36 pre_upgrade() { 37 _stop_services 38 } 39 40 post_upgrade() { 41 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : 42 43 # restore the services after an upgrade 44 if /usr/bin/systemctl -q is-enabled snapd.socket > /dev/null 2>&1; then 45 /usr/bin/systemctl start snapd.socket > /dev/null 2>&1 || : 46 fi 47 } 48 49 # vim:set ts=2 sw=2 et: