Skip to content

Instantly share code, notes, and snippets.

@pikatenor
Created November 30, 2021 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pikatenor/c9d02355191450e18e8dee813b52cf34 to your computer and use it in GitHub Desktop.
Save pikatenor/c9d02355191450e18e8dee813b52cf34 to your computer and use it in GitHub Desktop.
SoftEther systemd units
[Unit]
Description=SoftEther VPN Client
After=network.target
[Service]
Type=forking
ExecStart=/opt/vpnclient/vpnclient start
# ExecStartPost=/bin/bash -c 'sleep 5; dhclient -v vpn_vpn'
# ExecStopPre=/sbin/dhclient -v vpn_vpn
ExecStop=/opt/vpnclient/vpnclient stop
[Install]
WantedBy=multi-user.target
[Unit]
Description=Delete old SofetEther VPN Server logs
[Service]
Type=oneshot
ExecStart=/usr/bin/find /var/log/vpnserver -name '*.log' -mtime +30 -delete
[Unit]
Description=Delete old SofetEther VPN Server logs
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/opt/vpnserver/vpnserver start
ExecStop=/opt/vpnserver/vpnserver stop
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment