Syncthing - Clean up on package removal

This commit is contained in:
unman 2022-09-07 23:17:39 +00:00
parent 2e09546473
commit 84292d28fd
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
3 changed files with 37 additions and 0 deletions

12
syncthing/cancel.sls Normal file
View File

@ -0,0 +1,12 @@
/rw/config/rc.local:
file.replace:
- pattern: 'systemctl.*unmask.*syncthing@user.service'
- repl - ''
- backup: False
/rw/config/rc.local_2:
file.replace:
- pattern: 'systemctl.*start.*syncthing@user.service''
- repl - ''
- backup: False

3
syncthing/cancel.top Normal file
View File

@ -0,0 +1,3 @@
base:
syncthing:
- syncthing.configure

22
syncthing/clean.sls Normal file
View File

@ -0,0 +1,22 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
#
#
#
syncthing_down:
qvm.shutdown:
- name: syncthing
- flags:
- force
syncthing_revert_policy:
file.replace:
- name: /etc/qubes/policy.d/30-user.policy
- pattern: 'qubes.Syncthing.*'
- repl: ''
syncthing_default_policy:
file.prepend:
- name: /etc/qubes/policy.d/30-user.policy
- text: 'qubes.Syncthing * @anyvm @anyvm deny'
- makedirs: True