diff options
author | Vincent Grande | 2020-12-26 15:34:47 -0500 |
---|---|---|
committer | Vincent Grande | 2020-12-26 15:34:47 -0500 |
commit | 9b895c4b494d1afeb82f03c6ceb21c6e3dae7cf0 (patch) | |
tree | a45978f91a6abaff977e151a953e5b275370394f /gnupg-git.install | |
download | aur-9b895c4b494d1afeb82f03c6ceb21c6e3dae7cf0.tar.gz |
initial upload
Diffstat (limited to 'gnupg-git.install')
-rw-r--r-- | gnupg-git.install | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gnupg-git.install b/gnupg-git.install new file mode 100644 index 000000000000..1f19b99feb2d --- /dev/null +++ b/gnupg-git.install @@ -0,0 +1,31 @@ +_global_units() { + _units=(dirmngr.socket gpg-agent.socket gpg-agent-{browser,extra,ssh}.socket) + _dir=/etc/systemd/user/sockets.target.wants + + case $1 in + enable) + mkdir -p $_dir + for _u in "${_units[@]}"; do + ln -sf /usr/lib/systemd/user/$_u $_dir/$_u + done + ;; + disable) + for _u in "${_units[@]}"; do + rm -f $_dir/$_u + done + rmdir -p --ignore-fail-on-non-empty $_dir + ;; + esac +} + +post_install() { + # See FS#42798 and FS#47371 + dirmngr </dev/null &>/dev/null + + # Let systemd supervise daemons by default + _global_units enable +} + +pre_remove() { + _global_units disable +} |