Skip to content

Commit 6080d09

Browse files
committed
Use systemd instead of init.d by default
1 parent 7f90e15 commit 6080d09

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

examples/service/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ SSLCONFIGPATH=etc/ssl/
6262
CACERTPATH=/etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/ca-bundle.pem /etc/pki/tls/cacert.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/cert.pem
6363

6464
# Path for init script
65-
INITPATH=etc/init.d/
65+
#INITPATH=etc/init.d/
66+
INITPATH=etc/systemd/system/
6667

6768
# Path path for documentation
6869
DOCPATH=usr/share/doc/$(PKGNAME)/
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[Unit]
2+
Description=gogenexample service
3+
Documentation=https://github.com/tecnickcom/gogen
4+
After=network.target
5+
Wants=network.target
6+
7+
[Service]
8+
Type=simple
9+
ExecStart=/usr/bin/gogenexample
10+
Restart=on-failure
11+
RestartSec=5
12+
StandardOutput=append:/var/log/gogenexample.log
13+
StandardError=append:/var/log/gogenexample.log
14+
15+
# Security hardening options
16+
ProtectSystem=full
17+
ProtectHome=true
18+
NoNewPrivileges=true
19+
PrivateTmp=true
20+
21+
[Install]
22+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)