summarylogtreecommitdiffstats
path: root/mutantfactions.install
diff options
context:
space:
mode:
authorEray Aydın2015-07-25 07:40:17 +0300
committerEray Aydın2015-07-25 07:40:17 +0300
commit53e171010190bcfa4a4fcbf3a719ebc9d8d4221d (patch)
treec472e2b2eb06e72b02bf901338fc3bb36212e278 /mutantfactions.install
downloadaur-53e171010190bcfa4a4fcbf3a719ebc9d8d4221d.tar.gz
Updated to 1.08
Diffstat (limited to 'mutantfactions.install')
-rw-r--r--mutantfactions.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/mutantfactions.install b/mutantfactions.install
new file mode 100644
index 000000000000..e540e06f30b6
--- /dev/null
+++ b/mutantfactions.install
@@ -0,0 +1,27 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+ if [ ! `grep mutantfactions /etc/group` ]; then
+ groupadd mutantfactions &> /dev/null;
+ fi
+
+ id mutantfactions &>/dev/null || \
+ useradd -g mutantfactions -d /var/lib/mutantfactions -s /bin/false mutantfactions
+
+ chgrp -R mutantfactions /opt/mutantfactions/data
+ chown mutantfactions:mutantfactions /var/lib/mutantfactions
+ echo " >> Add yourself to the mutantfactions group to run the game."
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ userdel mutantfactions &> /dev/null
+ groupdel mutantfactions &> /dev/null
+}
+
+post_remove () {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+}
+