From fc08a300e43c081e6127b56536bea90fad70a640 Mon Sep 17 00:00:00 2001 From: olli Date: Fri, 16 Feb 2024 13:18:44 +0100 Subject: [PATCH] restart tor on acpi resume --- tornet.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tornet.yml b/tornet.yml index 8fd6205..cc15654 100644 --- a/tornet.yml +++ b/tornet.yml @@ -57,6 +57,32 @@ notify: - Restart tor + - name: restart tor after acpi sleep/resume + blockinfile: + path: /etc/systemd/system/tor-resume-restart.service + create: yes + mode: "0444" + owner: root + group: root + marker: "# {mark} ANSIBLE MANAGED BLOCK" + block: | + # restart tor after acpi sleep/resume + [Unit] + Description=Restart Bluetooth after resume + After=suspend.target + + [Service] + Type=simple + ExecStart=/usr/bin/systemctl --no-block restart tor.service + + [Install] + WantedBy=suspend.target + + - name: enable restart tor after acpi sleep/resume + command: systemctl enable tor-resume-restart.service + args: + creates: /etc/systemd/system/multi-user.target.wants/tor-resume-restart.service + - name: Privoxy Config blockinfile: path: /etc/privoxy/config