diff options
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 +} + |