diff options
author | graysky | 2015-09-19 15:18:37 -0400 |
---|---|---|
committer | graysky | 2015-09-19 15:18:37 -0400 |
commit | 9cf41c5e33406309476edcdcb9772e37fc5e2123 (patch) | |
tree | 74e7b35d18a40042bb3da3f632271cd605dba27b | |
parent | 37d395cf9f26713b37c857bf37ae4fdd0cd49db7 (diff) | |
download | aur-9cf41c5e33406309476edcdcb9772e37fc5e2123.tar.gz |
Update to 6.10-2
-rw-r--r-- | psd.install | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/psd.install b/psd.install index bafaf1b324ec..6a085c0f8555 100644 --- a/psd.install +++ b/psd.install @@ -29,7 +29,6 @@ pre_upgrade() { running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')" if [[ "$running" = "active" ]]; then su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service' - su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user daemon-reload' echo '-> Internal changes to psd require it to be stopped now before updating.' echo '-> Recommend that you diff /usr/share/doc/psd/psd.conf against ~/.config/psd/psd.conf' fi @@ -52,7 +51,6 @@ pre_upgrade() { running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')" if [[ "$running" = "active" ]]; then su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service' - su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user daemon-reload' echo '-> Internal changes to psd require it to be stopped now before updating.' echo '-> Users of overlayfs: you must run the following before starting the service: psd p' fi @@ -71,11 +69,34 @@ pre_upgrade() { running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')" if [[ "$running" = "active" ]]; then su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user stop psd.service' - su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user daemon-reload' echo '-> Internal changes to psd require it to be stopped now before updating.' fi done fi +} + +post_upgrade() { + # version 6.01 redefines the location of tmpfs for the software so it is + # required that pacman stop the user service here if running + if [ $(vercmp $2 6.01) -lt 0 ]; then + _daemon_refresh + fi + + # version 6.05 impliments changes to both the service and the way overlayfs is mounted/umount + # so it is required that pacman stop the user service here if running + if [ $(vercmp $2 6.05) -lt 0 ]; then + _daemon_refresh + fi + + # version 6.10 relocates pid file + if [ $(vercmp $2 6.10) -lt 0 ]; then + _daemon_refresh + fi + + # version 6.11 modified services + if [ $(vercmp $2 6.11) -lt 0 ]; then + _daemon_refresh + fi } @@ -89,3 +110,12 @@ pre_remove() { fi done } + +_daemon_refresh() { + for i in $(users); do + running="$(su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user is-active psd')" + if [[ "$running" = "active" ]]; then + su $i -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID systemctl --user daemon-reload' + fi + done +} |