add systemd stuff for dist

This commit is contained in:
xenia 2021-01-10 05:08:24 -05:00
parent c4b6c12e59
commit 2c2287f9ee
3 changed files with 15 additions and 2 deletions

4
dist/PKGBUILD vendored
View File

@ -66,6 +66,6 @@ package() {
install -Dm644 "$srcdir/crossfire/etc/crossfire.rktd" "$pkgdir/etc/crossfire.rktd"
# install tmpfiles and sysusers for systemd
# install server systemd service
echo todo
return -1
install -Dm644 "$srcdir/crossfire/dist/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/crossfire.conf"
install -Dm644 "$srcdir/crossfire/dist/crossfire.service" "$pkgdir/usr/lib/systemd/system/crossfire.service"
}

12
dist/crossfire.service vendored Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Crossfire server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=crossfire
ExecStart=/usr/bin/crossfire-server
[Install]
WantedBy=multi-user.target

1
dist/sysusers.conf vendored Normal file
View File

@ -0,0 +1 @@
u crossfire - "Crossfire server user" /var/lib/crossfire/