summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGab <24553253+gabrix73@users.noreply.github.com>2025-06-09 17:03:04 +0200
committerGitHub <noreply@github.com>2025-06-09 17:03:04 +0200
commitb99b489d1601de693f32cb26f5bdf1cb8614313a (patch)
treeb81419a04714d40a1dbceb2d8ebf6f2fbb49a6b7
parent7ddb67d4748ca65f6317d5c4b0c1a0e939998cca (diff)
downloadonion-newsreader-b99b489d1601de693f32cb26f5bdf1cb8614313a.tar.gz
onion-newsreader-b99b489d1601de693f32cb26f5bdf1cb8614313a.tar.xz
onion-newsreader-b99b489d1601de693f32cb26f5bdf1cb8614313a.zip
Create onion-newsreader.service
-rw-r--r--onion-newsreader.service94
1 files changed, 94 insertions, 0 deletions
diff --git a/onion-newsreader.service b/onion-newsreader.service
new file mode 100644
index 0000000..c35cc2f
--- /dev/null
+++ b/onion-newsreader.service
@@ -0,0 +1,94 @@
+[Unit]
+Description=Onion Newsreader Anonymous NNTP Client
+After=network.target tor.service
+Wants=tor.service
+Documentation=https://github.com/gabrix73/onion-newsreader.git
+
+[Service]
+Type=simple
+User=newsreader
+Group=newsreader
+WorkingDirectory=/opt/onion-newsreader
+ExecStart=/opt/onion-newsreader/bin/onion-newsreader
+ExecReload=/bin/kill -HUP $MAINPID
+EnvironmentFile=/etc/onion-newsreader/environment
+
+# Security
+NoNewPrivileges=true
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=true
+ReadWritePaths=/opt/onion-newsreader /var/log/onion-newsreader
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectControlGroups=true
+RestrictSUIDSGID=true
+RestrictRealtime=true
+RestrictNamespaces=true
+LockPersonality=true
+MemoryDenyWriteExecute=true
+SystemCallFilter=@system-service
+SystemCallErrorNumber=EPERM
+
+# Restart policy
+Restart=always
+RestartSec=10
+StartLimitInterval=60
+StartLimitBurst=3
+
+# Logging
+StandardOutput=journal
+StandardError=journal
+SyslogIdentifier=onion-newsreader
+
+[Install]
+WantedBy=multi-user.target
+mct8:/opt/onion-newsreader/src# nano /etc/systemd/system/onion-newsreader.service
+mct8:/opt/onion-newsreader/src# systemctl daemon-reload
+mct8:/opt/onion-newsreader/src# nano /etc/systemd/system/onion-newsreader.service
+mct8:/opt/onion-newsreader/src# cat /etc/systemd/system/onion-newsreader.service
+[Unit]
+Description=Onion Newsreader Anonymous NNTP Client
+After=network.target tor.service
+Wants=tor.service
+Documentation=https://github.com/gabrix73/onion-newsreader.git
+
+[Service]
+Type=simple
+User=newsreader
+Group=newsreader
+WorkingDirectory=/opt/onion-newsreader
+ExecStart=/opt/onion-newsreader/bin/onion-newsreader
+ExecReload=/bin/kill -HUP $MAINPID
+EnvironmentFile=/etc/onion-newsreader/environment
+
+# Security
+NoNewPrivileges=true
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=true
+ReadWritePaths=/opt/onion-newsreader /var/log/onion-newsreader
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectControlGroups=true
+RestrictSUIDSGID=true
+RestrictRealtime=true
+RestrictNamespaces=true
+LockPersonality=true
+MemoryDenyWriteExecute=true
+SystemCallFilter=@system-service
+SystemCallErrorNumber=EPERM
+
+# Restart policy
+Restart=always
+RestartSec=10
+StartLimitInterval=60
+StartLimitBurst=3
+
+# Logging
+StandardOutput=journal
+StandardError=journal
+SyslogIdentifier=onion-newsreader
+
+[Install]
+WantedBy=multi-user.target