Last active
May 31, 2019 00:26
-
-
Save notsure2/484c1357a6102979abd77ba756e1919f to your computer and use it in GitHub Desktop.
tunsafe systemd script
This file contains hidden or 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=TunSafe VPN Service - %i | |
Wants=network-online.target | |
After=network-online.target | |
After=multi-user.target | |
[Service] | |
Type=simple | |
User=root | |
WorkingDirectory=/etc/tunsafe | |
EnvironmentFile=-/etc/tunsafe/%i.env | |
ExecStart=/bin/sh -c "/usr/bin/tunsafe start $${dev:+-n $$dev} %i.conf" | |
KillSignal=SIGINT | |
DeviceAllow=/dev/null rw | |
DeviceAllow=/dev/net/tun rw | |
ProtectSystem=true | |
ProtectHome=true | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment