Created
November 30, 2021 06:21
-
-
Save pikatenor/c9d02355191450e18e8dee813b52cf34 to your computer and use it in GitHub Desktop.
SoftEther systemd units
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Delete old SofetEther VPN Server logs | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/find /var/log/vpnserver -name '*.log' -mtime +30 -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Delete old SofetEther VPN Server logs | |
[Timer] | |
OnCalendar=daily | |
Persistent=true | |
[Install] | |
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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