diff options
author | Philip Abernethy | 2015-07-14 11:21:53 +0200 |
---|---|---|
committer | Philip Abernethy | 2015-07-14 11:21:53 +0200 |
commit | b6053ccbf830452b15012860cbdcc98752077124 (patch) | |
tree | 640752cac32a21a006fe05707df2edb6481d452c /tshock.install | |
download | aur-b6053ccbf830452b15012860cbdcc98752077124.tar.gz |
Initial commit
Diffstat (limited to 'tshock.install')
-rw-r--r-- | tshock.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tshock.install b/tshock.install new file mode 100644 index 000000000000..c6250ba4f93d --- /dev/null +++ b/tshock.install @@ -0,0 +1,22 @@ +post_install() { + getent group tshock >/dev/null 2>&1 || groupadd tshock + getent passwd tshock >/dev/null 2>&1 || useradd -g tshock -d /srv/tshock/ -s /bin/bash tshock + chown -R tshock:tshock /srv/tshock/ + + echo ">>> Run \`sudo -u tshock /srv/tshock/tshock.sh install\` and create a world named World1 + You can then start tshock@default.service" +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd tshock >/dev/null 2>&1; then + userdel tshock + fi + if getent group tshock >/dev/null 2>&1; then + groupdel tshock + fi +} + |