summarylogtreecommitdiffstats
path: root/mutantfactions-server
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-server
downloadaur-53e171010190bcfa4a4fcbf3a719ebc9d8d4221d.tar.gz
Updated to 1.08
Diffstat (limited to 'mutantfactions-server')
-rw-r--r--mutantfactions-server26
1 files changed, 26 insertions, 0 deletions
diff --git a/mutantfactions-server b/mutantfactions-server
new file mode 100644
index 000000000000..b38b02ee9579
--- /dev/null
+++ b/mutantfactions-server
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+source /etc/conf.d/mutantfactions
+
+USER=$(id -un)
+if [[ $USER != "mutantfactions" ]]; then
+ echo "This program should only be run by the mutantfactions user"
+ exit
+fi
+
+cleanup()
+{
+ fusermount -u $HOME/.mutantfactions/overlay
+}
+
+if [[ ! -d $HOME/.mutantfactions/overlay ]]; then
+ mkdir -p $HOME/.mutantfactions/overlay
+fi
+if [[ ! -d $HOME/.mutantfactions/data ]]; then
+ mkdir -p $HOME/.mutantfactions/data
+fi
+
+unionfs -o cow $HOME/.mutantfactions/data=RW:/opt/mutantfactions=RO $HOME/.mutantfactions/overlay
+trap cleanup SIGINT
+$HOME/.mutantfactions/overlay/MutantFactionsServer $MUTANT_FACTIONS_ARGS
+