aboutsummarylogtreecommitdiffstats
path: root/spigot.install
diff options
context:
space:
mode:
authorSchala2015-06-08 09:49:51 -0700
committerSchala2015-06-08 09:49:51 -0700
commitcf26246049ad15da722dbba5a01ae88d65dd02ae (patch)
treedbfc0cf0acb54be348cb3eab5da0423324862dfb /spigot.install
downloadaur-cf26246049ad15da722dbba5a01ae88d65dd02ae.tar.gz
initial import
Diffstat (limited to 'spigot.install')
-rwxr-xr-xspigot.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/spigot.install b/spigot.install
new file mode 100755
index 000000000000..68524cf55999
--- /dev/null
+++ b/spigot.install
@@ -0,0 +1,18 @@
+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
+}