From f1d4f845803babecc57aec8f4333124330d7e655 Mon Sep 17 00:00:00 2001 From: Tharre Date: Sun, 8 Feb 2015 21:01:03 +0100 Subject: Add spigot-custom --- spigot/spigot.install | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 spigot/spigot.install (limited to 'spigot/spigot.install') 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 +} + -- cgit v1.2.3-70-g09d2