Skip to content

Instantly share code, notes, and snippets.

@Blackpaw
Last active March 4, 2023 14:37
Show Gist options
  • Save Blackpaw/c4bb4f6d27bf5440945c107b6f3c78a3 to your computer and use it in GitHub Desktop.
Save Blackpaw/c4bb4f6d27bf5440945c107b6f3c78a3 to your computer and use it in GitHub Desktop.
piactl systemd script
[Unit]
Description=Private Internet Access Control
Wants=network-online.target piavpn.service
After=syslog.target network.target network-online.target piavpn.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/piactl connect
RemainAfterExit=true
Restart=on-failure
ExecStop=/usr/local/bin/piactl disconnect
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment