summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDian Fay2016-09-24 14:43:51 -0400
committerDian Fay2016-09-24 14:43:51 -0400
commitabf27b0c25c88260081c0cd45897f785e298108d (patch)
tree7d1519796774fc1433e05f1e16f685031b978ceb
parent1e19758b5dd7beee5e9d009308f3364575ca8ae6 (diff)
downloadaur-abf27b0c25c88260081c0cd45897f785e298108d.tar.gz
fix user setup
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rwxr-xr-xdom45
-rw-r--r--dom4-server.install3
-rw-r--r--dom4-server.service1
5 files changed, 13 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6fddbb94683..f9223bfd911 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dom4-server
pkgdesc = Configure and run Dominions 4 as a headless server
- pkgver = 1.0.5
+ pkgver = 1.0.6
pkgrel = 1
url = http://www.illwinter.com/dom4/
install = dom4-server.install
@@ -13,10 +13,10 @@ pkgbase = dom4-server
source = dom4
source = default.properties
md5sums = d8e3011dfa108d3f1574c57aefcecb32
- md5sums = 7e51badb10054709bbec60bfcbf424ee
+ md5sums = d7467fb7a599236f71d428a85cf05014
md5sums = e9772a237cc540558e74235b98df8a7f
md5sums = 338b8462868ecf6cc56c4a520cea6bac
- md5sums = 48350dc0c90ea1c611e6ceeeae71811a
+ md5sums = 26c54faba6e1b864997cc918723c8db4
md5sums = 22bdb16a296d12c51988c43c3218201b
pkgname = dom4-server
diff --git a/PKGBUILD b/PKGBUILD
index 950f38443cd..de2e9eb0eec 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Dominions 4 Server Configuration
# Maintainer: Dian Fay <dian.m.fay@gmail.com>
pkgname=dom4-server
-pkgver=1.0.5
+pkgver=1.0.6
pkgrel=1
pkgdesc="Configure and run Dominions 4 as a headless server"
arch=('x86_64')
@@ -29,8 +29,8 @@ package() {
install -Dm644 "$srcdir/dom4-tmpfile.conf" "$pkgdir/usr/lib/tmpfiles.d/dom4.conf"
}
md5sums=('d8e3011dfa108d3f1574c57aefcecb32'
- '7e51badb10054709bbec60bfcbf424ee'
+ 'd7467fb7a599236f71d428a85cf05014'
'e9772a237cc540558e74235b98df8a7f'
'338b8462868ecf6cc56c4a520cea6bac'
- '48350dc0c90ea1c611e6ceeeae71811a'
+ '26c54faba6e1b864997cc918723c8db4'
'22bdb16a296d12c51988c43c3218201b')
diff --git a/dom4 b/dom4
index f2d2b9ac389..73d2ba6178c 100755
--- a/dom4
+++ b/dom4
@@ -18,6 +18,7 @@ function change {
echo "Setting $1 up for hosting."
echo "$1" > /usr/share/dom4/current
+ chown dom4:dom4 /usr/share/dom4/current
}
# Load a properties file.
@@ -123,7 +124,7 @@ function ready {
if [[ -s "/usr/share/dom4/savedgames/$game/ftherlnd" ]]; then
echo "$game has already been started. If the service is not running, start it with systemctl."
- exit 1
+ exit 0
fi
players=$(ls -1 /usr/share/dom4/savedgames/$game/*.2h | wc -l)
@@ -131,7 +132,7 @@ function ready {
if grep -qE "uploadtime|uploadmaxp" /usr/share/dom4/config/$game.properties ; then
echo "Upload flag already set for $game. Start the service with systemctl."
- exit 1
+ exit 0
fi
echo "Setting start flag for $game ($players players)"
diff --git a/dom4-server.install b/dom4-server.install
index 3c82daec748..90156c3870f 100644
--- a/dom4-server.install
+++ b/dom4-server.install
@@ -13,6 +13,9 @@ post_upgrade() {
systemd-tmpfiles --create dom4.conf
fi
+ chown dom4:dom4 /usr/bin/dom4-server
+ chown -R dom4:dom4 /usr/share/dom4
+
cat <<EOF
Post-install tasks:
diff --git a/dom4-server.service b/dom4-server.service
index 45ee40673df..e3b1290d88a 100644
--- a/dom4-server.service
+++ b/dom4-server.service
@@ -5,6 +5,7 @@ After=network.target
[Service]
ExecStart=/usr/bin/dom4-server
Type=simple
+User=dom4
RemainAfterExit=yes
[Install]