From f3a3566e8f09b448e0421f1f16a368e9a5176d76 Mon Sep 17 00:00:00 2001
From: SilicaAndPina
Date: Mon, 18 Apr 2022 18:18:18 +1200
Subject: [PATCH] Fix permissons
---
.github/workflows/build.yml | 3 +--
HorseIsleServer/HISPd/Resources/DEBIAN/postinst | 2 +-
HorseIsleServer/HISPd/Resources/HISP.service | 6 +-----
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 33bebd4..f848898 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -108,9 +108,8 @@ jobs:
dos2unix /mnt/fucking-windows/Debian64/DEBIAN/postinst
dos2unix /mnt/fucking-windows/Debian64/DEBIAN/postrm
dos2unix /mnt/fucking-windows/Debian64/etc/systemd/system/HISP.service
- chmod 644 -R /mnt/fucking-windows/Debian64
+ chmod 755 -R /mnt/fucking-windows/Debian64
chmod +x /mnt/fucking-windows/Debian64/usr/bin/HISPd
- chmod 755 -R /mnt/fucking-windows/Debian64/DEBIAN
mkdir debpackage
dpkg-deb --build /mnt/fucking-windows/Debian64
mv /mnt/fucking-windows/Debian64.deb debpackage/HISP.deb
diff --git a/HorseIsleServer/HISPd/Resources/DEBIAN/postinst b/HorseIsleServer/HISPd/Resources/DEBIAN/postinst
index 62fe485..1b1d1a7 100644
--- a/HorseIsleServer/HISPd/Resources/DEBIAN/postinst
+++ b/HorseIsleServer/HISPd/Resources/DEBIAN/postinst
@@ -1,7 +1,7 @@
#!/bin/sh
useradd horseisle
-chown -R horseisle /etc/hisp
+chown -R horseisle:horseisle /etc/hisp
systemctl enable HISP.service
systemctl start HISP
diff --git a/HorseIsleServer/HISPd/Resources/HISP.service b/HorseIsleServer/HISPd/Resources/HISP.service
index f978da7..a945eac 100644
--- a/HorseIsleServer/HISPd/Resources/HISP.service
+++ b/HorseIsleServer/HISPd/Resources/HISP.service
@@ -9,16 +9,12 @@ After=mariadb.service
[Service]
-RestartSec=5s
-Restart=on-abort
-
Type=simple
# Disable access to features HISP doesnt need
# (For security ...)
ProtectSystem=full
PrivateDevices=true
-ProtectHome=true
StandardError=syslog+console
StandardOutput=syslog+console
@@ -29,7 +25,7 @@ Group=horseisle
WorkingDirectory=/etc/hisp
ExecStart=/usr/bin/HISPd
-Environment=USER=horseisle HOME=/etc/hisp/home HISP_BASE_DIR=/etc/hisp HISP_CONF_FILE=/etc/hisp/server.properties
+Environment=USER=horseisle HOME=/etc/hisp HISP_BASE_DIR=/etc/hisp HISP_CONF_FILE=/etc/hisp/server.properties
[Install]
WantedBy=multi-user.target