From 1c3ddb220189ff1347ca9e6839a96993c126032b Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Sat, 27 Oct 2018 21:10:38 -0300 Subject: [PATCH] Including services before wakeup and after sleep --- Services/after-wakeup.service | 10 ++++++++++ Services/before-sleep.service | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Services/after-wakeup.service create mode 100644 Services/before-sleep.service diff --git a/Services/after-wakeup.service b/Services/after-wakeup.service new file mode 100644 index 0000000..9fdb467 --- /dev/null +++ b/Services/after-wakeup.service @@ -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 diff --git a/Services/before-sleep.service b/Services/before-sleep.service new file mode 100644 index 0000000..272fee2 --- /dev/null +++ b/Services/before-sleep.service @@ -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