Skip to content

Commit fc86fb3

Browse files
authored
Merge pull request #88 from Rollbacke/feature/systemd_file_for_autostart
Feature/systemd file for autostart
2 parents ab5d8e0 + 04b4d8a commit fc86fb3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[Unit]
2+
Description=Turing Smart Screen
3+
Requires=network-online.target
4+
After=network-online.target
5+
6+
[Service]
7+
Type=simple
8+
User=root
9+
10+
WorkingDirectory=/opt/turing-smart-screen-python/
11+
ExecStart=python3 main.py
12+
13+
; Always restart the script
14+
Restart=always
15+
16+
; cf. https://www.darkcoding.net/software/the-joy-of-systemd/
17+
; /usr, /boot and /etc are read-only
18+
ProtectSystem=full
19+
; $HOME is read only ..
20+
ProtectHome=read-only
21+
; /tmp is isolated from all other processes
22+
PrivateTmp=true
23+
; Don't allow process to raise privileges (e.g. disable suid)
24+
NoNewPrivileges=true
25+
26+
[Install]
27+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)