aboutsummaryrefslogtreecommitdiff
path: root/contrib/ptunnel-ng.service
blob: 3dae2a96a82b5a24dfd85d6507b12d80e55b6a57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[Unit]
Description=PingTunnel NG Proxy/Server
After=syslog.target

[Service]
Type=fork
EnvironmentFile=/etc/conf.d/ptunnel-ng
Environment="PT_CHROOT=${PT_CHROOT:/var/lib/ptunnel}"
Environment="PT_USER=${PT_USER:nobody}"
Environment="PT_GROUP=${PT_GROUP:nobody}"
ExecStartPre=mkdir -p ${PT_CHROOT}
ExecStartPre=chown ${PT_USER}:${PT_GROUP} ${PT_CHROOT}
ExecStart=/usr/bin/ptunnel-ng \
	--syslog \
	--chroot=${PT_CHROOT} --user=${PT_USER} --group=${PT_GROUP} \
	$PT_PASSWD $PT_MAGIC $PT_DESTIP $PT_DESTPORT
Restart=on-abort

[Install]
WantedBy=multi-user.target