diff options
author | Johannes Wienke | 2015-06-10 21:43:12 +0200 |
---|---|---|
committer | Johannes Wienke | 2015-06-10 21:43:12 +0200 |
commit | 5fed1b9951dda1b011aad93eb9dd304223b5681a (patch) | |
tree | bd4388fc4a176cc14d1fd6ad61d607653230405b /spread-daemon.install | |
download | aur-5fed1b9951dda1b011aad93eb9dd304223b5681a.tar.gz |
Initial migration commit
Diffstat (limited to 'spread-daemon.install')
-rw-r--r-- | spread-daemon.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spread-daemon.install b/spread-daemon.install new file mode 100644 index 000000000000..54db7cb041e7 --- /dev/null +++ b/spread-daemon.install @@ -0,0 +1,21 @@ +post_install() { + getent group spread &>/dev/null || groupadd -r spread >/dev/null + getent passwd spread &>/dev/null || useradd -r -d /var/lib/spread -s /bin/false -g spread spread >/dev/null + true +} + +post_upgrade() { + post_install + true +} + +pre_remove() { + systemctl stop spread.service &>/dev/null + true +} + +post_remove() { + getent passwd spread &>/dev/null && userdel spread >/dev/null + getent group spread &>/dev/null && groupdel spread >/dev/null + true +} |