aboutsummaryrefslogtreecommitdiff
path: root/contrib/ptunnel-ng.service
diff options
context:
space:
mode:
authorMasaq- <tilt@techie.com>2019-02-03 03:33:26 +0000
committerMasaq- <tilt@techie.com>2019-02-03 03:33:26 +0000
commitc1af90a23a14494a82df977861e9b0adc29f638d (patch)
treee680cacb29c48e9decd42a9ec8bfd206bb206437 /contrib/ptunnel-ng.service
parent020634e1e84ab6063b0b403432002073bdaffe09 (diff)
parent6eb4245784b734e24870e2ba3c946527feb7f709 (diff)
Merge branch 'master' into extended-options
Diffstat (limited to 'contrib/ptunnel-ng.service')
-rw-r--r--contrib/ptunnel-ng.service20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/ptunnel-ng.service b/contrib/ptunnel-ng.service
new file mode 100644
index 0000000..3dae2a9
--- /dev/null
+++ b/contrib/ptunnel-ng.service
@@ -0,0 +1,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