1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-25 23:36:18 +00:00
Lakka-LibreELEC/packages/sysutils/systemd/config/system.d/openvpn.service.sample
2016-03-18 00:09:17 -07:00

45 lines
1.1 KiB
Plaintext

[Unit]
Description=OpenVPN Autorun Service
[Service]
Type=forking
Requires=network-online.service
After=network-online.service
ExecStart=/usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config
Restart=always
RestartSec=15
[Install]
WantedBy=kodi.target
# NOTES:
#
# 1) Edit /storage/.config/openvpn.config to the .config/.conf/.ovpn file
# from your VPN service provider and test it works first by connecting at
# the console:
#
# /usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config
#
# 2) The openvpn.service file must be addeded to the active systemd config
# before it will work. This is done by running:
#
# systemctl enable openvpn.service
#
# 3) If you suspend/resume your LibreELEC system you will need to stop and
# restart the connection with a systemd *.power script, e.g.
#
# mkdir -p /storage/.config/sleep.d
# nano /storage/.config/sleep.d/01-openvpn.power
#
# Copy the sample script below. Remove # marks except for #!/bin/bash
#
# #!/bin/sh
# case "$1" in
# pre)
# systemctl stop openvpn.service
# ;;
# post)
# systemctl start openvpn.service
# ;;
# esac