learning_record_doc/apps/openvpn/linux开机自启.md
2023-09-19 17:40:07 +08:00

320 B

sudo vim /usr/lib/systemd/system/openvpnclient.service

[Unit]
Description=OpenVPNClient

[Service]
Type=simple
ExecStart=openvpn /etc/openvpn/client/server001.ovpn
ExecStop=/usr/bin/killall openvpn
Restart=always
User=root

[Install]
WantedBy=multi-user.target


##刷新
sudo systemctl daemon-reload