[PATCH 1/2] Run in foreground when using systemd

Aron Xu aron at debian.org
Fri Jan 23 20:04:49 PST 2015


---
 doc/systemd/socket-activated/ocserv.service | 3 +--
 doc/systemd/standalone/ocserv.service       | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/systemd/socket-activated/ocserv.service b/doc/systemd/socket-activated/ocserv.service
index 3e80250..3b01bd8 100644
--- a/doc/systemd/socket-activated/ocserv.service
+++ b/doc/systemd/socket-activated/ocserv.service
@@ -6,9 +6,8 @@ Requires=ocserv.socket
 
 [Service]
 PrivateTmp=true
-Type=forking
 PIDFile=/var/run/ocserv.pid
-ExecStart=/usr/sbin/ocserv --pid-file /var/run/ocserv.pid --config /etc/ocserv/ocserv.conf
+ExecStart=/usr/sbin/ocserv --foreground --pid-file /var/run/ocserv.pid --config /etc/ocserv/ocserv.conf
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
diff --git a/doc/systemd/standalone/ocserv.service b/doc/systemd/standalone/ocserv.service
index 86fca91..ca8d359 100644
--- a/doc/systemd/standalone/ocserv.service
+++ b/doc/systemd/standalone/ocserv.service
@@ -1,15 +1,14 @@
 [Unit]
 Description=OpenConnect SSL VPN server
 Documentation=man:ocserv(8)
-After=syslog.target
 After=network.target
+After=syslog.target
 After=dbus.service
 
 [Service]
 PrivateTmp=true
-Type=forking
 PIDFile=/var/run/ocserv.pid
-ExecStart=/usr/sbin/ocserv --pid-file /var/run/ocserv.pid --config /etc/ocserv/ocserv.conf
+ExecStart=/usr/sbin/ocserv --foreground --pid-file /var/run/ocserv.pid --config /etc/ocserv/ocserv.conf
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
-- 
2.1.4




More information about the openconnect-devel mailing list