diff options
author | Tharre <tharre3@gmail.com> | 2015-02-08 21:01:03 +0100 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2015-02-08 21:01:03 +0100 |
commit | f1d4f845803babecc57aec8f4333124330d7e655 (patch) | |
tree | 83a004e263ba2f7f69b5e10b9c3093366f784aad /spigot/spigot.install | |
parent | 1132867f9fe996863873799917377d473527609b (diff) | |
download | pkgbuilds-f1d4f845803babecc57aec8f4333124330d7e655.tar.gz pkgbuilds-f1d4f845803babecc57aec8f4333124330d7e655.tar.xz pkgbuilds-f1d4f845803babecc57aec8f4333124330d7e655.zip |
Add spigot-custom
Diffstat (limited to 'spigot/spigot.install')
-rw-r--r-- | spigot/spigot.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spigot/spigot.install b/spigot/spigot.install new file mode 100644 index 0000000..20067d1 --- /dev/null +++ b/spigot/spigot.install @@ -0,0 +1,21 @@ +post_install() { + getent group craftbukkit >/dev/null 2>&1 || groupadd craftbukkit + getent passwd craftbukkit >/dev/null 2>&1 || useradd -g craftbukkit -d /srv/craftbukkit -s /bin/bash craftbukkit + chown -R craftbukkit:craftbukkit /srv/craftbukkit/ +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd craftbukkit >/dev/null 2>&1; then + userdel craftbukkit + fi + if getent group craftbukkit >/dev/null 2>&1; then + groupdel craftbukkit + fi + + echo "There are probably still files in /srv/craftbukkit, you must remove those manually!" >&2 +} + |