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