Including services before wakeup and after sleep

This commit is contained in:
Bruno F. Fontes 2018-10-27 21:10:38 -03:00
parent f0173999cd
commit 1c3ddb2201
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,10 @@
[Unit]
Description=Bruno Fontes script after wakeup
After=suspend.target
[Service]
Type=simple
ExecStart=/usr/bin/systemctl restart openvpn-client@privatvpn.service
[Install]
WantedBy=suspend.target

View File

@ -0,0 +1,11 @@
[Unit]
Description=Bruno Fontes script before sleep
Before=sleep.target
[Service]
Type=oneshot
Environment=DISPLAY=:0
ExecStart=echo ""
[Install]
WantedBy=sleep.target