summarylogtreecommitdiffstats
path: root/spearmint.install
diff options
context:
space:
mode:
authorbrent s2016-04-06 04:18:24 -0400
committerbrent s2016-04-06 04:18:24 -0400
commitd90aa32541d4a0816237dd089824d539cdca8b48 (patch)
tree0312fc65e1c0e14a3c2344f5e0262d712edcecd3 /spearmint.install
downloadaur-d90aa32541d4a0816237dd089824d539cdca8b48.tar.gz
adding gitignore, updating to sha512sums
Diffstat (limited to 'spearmint.install')
-rw-r--r--spearmint.install32
1 files changed, 32 insertions, 0 deletions
diff --git a/spearmint.install b/spearmint.install
new file mode 100644
index 000000000000..6844de9167e3
--- /dev/null
+++ b/spearmint.install
@@ -0,0 +1,32 @@
+post_install() {
+ groupadd -f games
+ useradd -r -s /sbin/nologin -c "Spearmint Daemon user" -M -d /opt/quake3 -g games spearmint > /dev/null 2>&1
+ chown -R spearmint:games /opt/quake3
+
+ echo '!!!'
+ echo '!!! NOTE: TO PLAY SPEARMINT, YOU MUST BE PART OF THE "games" GROUP!'
+ echo '!!! To play Spearmint with the Retail Version of Quake III: Arena,'
+ echo '!!! move the pak0.pk3 file from the original game CD to /opt/quake3/baseq3/'
+ echo '!!!'
+ echo '!!!'
+ echo '!!! When you have the .pk3 file(s) installed, you can run the game via: quake3'
+ echo '!!! See https://github.com/zturtleman/spearmint/wiki for more documentation.'
+ echo '!!!'
+}
+
+post_upgrade() {
+ post_install ${1}
+}
+
+post_remove() {
+ #userdel -rf spearmint > /dev/null 2>&1
+ userdel spearmint > /dev/null 2>&1
+ if egrep -q '^games:.*:$' /etc/group;
+ then
+ groupdel games
+ fi
+ if [[ -d '/opt/quake3' ]];
+ then
+ chown -R root:root /opt/quake3 > /dev/null 2>&1
+ fi
+}