1. [Unit]
  2. Description=Starts Openvpn on openvpn-germany file
  3. After=network-online.target
  4. [Timer]
  5. OnBootSec=5min
  6. [Service]
  7. Type=forking
  8. User=root
  9. Group=root
  10. UMask=007
  11. PIDFile=/home/orangepi/openvpn-germany.pid
  12. PrivateTmp=true
  13. ExecStart=/usr/sbin/openvpn --daemon --writepid /home/orangepi/openvpn-germany.pid --cd /home/orangepi/Downloads/ --config openvpn-germany.conf
  14. ExecStop=pkill openvpn
  15. Restart=on-failure
  16. RestartSec=300
  17. # Configures the time to wait before service is stopped forcefully.
  18. #TimeoutStopSec=300
  19. [Install]
  20. WantedBy=multi-user.target

OPENVPN Systemd script