I was unable to compile the source downloaded from softether.com. And I don think there is binarys to download? ppa:s are old. Instead i used git clone and compiled from there. Thats where I got the sytemd script.
This was the error log:
jan 04 22:17:32 berto vpnserver[1982]: -- Alert: SoftEther VPN Kernel --
jan 04 22:17:32 berto vpnserver[1982]: Fatal Error: The file "hamcore.se2" is missing or broken.
jan 04 22:17:32 berto vpnserver[1982]: Please check hamcore.se2.
jan 04 22:17:32 berto vpnserver[1982]: [1B blob data]
jan 04 22:17:32 berto vpnserver[1982]: (First, reboot the computer. If this problem occurs again, please reinstall VPN software files.)
jan 04 22:17:32 berto systemd[1]: softether-vpnserver.service: Control process exited, code=exited status=255
jan 04 22:17:32 berto systemd[1]: Failed to start SoftEther VPN Server.
This is my script:
[Unit]
Description=SoftEther VPN Server
After=network.target auditd.service
ConditionPathExists=!/usr/vpnserver/do_not_run
[Service]
Type=forking
EnvironmentFile=-/usr/vpnserver
ExecStart=/usr/vpnserver/vpnserver start
ExecStop=/usr/vpnserver/vpnserver stop
KillMode=process
Restart=on-failure
WorkingDirectory=/usr/vpnserver
# Hardening
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=-/usr/vpnserver
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID
[Install]
WantedBy=multi-user.target
-- Unit softether-vpnserver.service has begun starting up.
jan 04 22:29:54 berto vpnserver[2097]: The SoftEther VPN Server service has been started.
jan 04 22:29:54 berto systemd[1]: Started SoftEther VPN Server.
-- Subject: Unit softether-vpnserver.service has finished start-up
-- Defined-By: systemd
-- Support:
http://www.ubuntu.com/support
--
-- Unit softether-vpnserver.service has finished starting up.
--
-- The start-up result is done.