This commit is contained in:
navanchauhan
2022-07-04 16:37:56 +05:30
parent d2683b14f1
commit 1c6adb7d42
6 changed files with 39 additions and 300 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
SOURCE_URL=url of app's source
SOURCE_SUM=sha256 checksum
SOURCE_URL=https://download.technitium.com/dns/archive/8.1.4/DnsServerPortable.tar.gz
SOURCE_SUM=f244e358a8f7ae5891e3b6a86ac8445a3ea515b9f62d7e14225f1ca24f5c50ac
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
#SOURCE_FILENAME=
SOURCE_EXTRACT=true
+7 -8
View File
@@ -1,5 +1,5 @@
[Unit]
Description=Small description of the service
Description=Technitium DNS Server
After=network.target
[Service]
@@ -7,14 +7,15 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/script
ExecStart=/usr/bin/dotnet __FINALPATH__/DnsServerApp.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dns-server
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these
# .. but this should be a good baseline
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
@@ -38,8 +39,6 @@ CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
[Install]
WantedBy=multi-user.target