2022年1月

先新建启动脚本/etc/systemd/system/vpnserver.service

[Unit]
Description=SoftEther VPN Server
After=network.target

[Service]
Type=forking
ExecStart=/root/vpnserver/vpnserver start
ExecStop=/root/vpnserver/vpnserver stop

[Install]
WantedBy=multi-user.target

然后就可以通过systemctl start vpnserver启动了,并通过systemctl enable vpnserver设置开机自启。