Skip to content

Instantly share code, notes, and snippets.

@notsure2
Last active May 31, 2019 00:26
Show Gist options
  • Save notsure2/484c1357a6102979abd77ba756e1919f to your computer and use it in GitHub Desktop.
Save notsure2/484c1357a6102979abd77ba756e1919f to your computer and use it in GitHub Desktop.
tunsafe systemd script
[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