mirror of
https://github.com/pigmonkey/spark.git
synced 2026-07-23 08:01:29 +00:00
only start git-annex if autostart file exists
The service will fail otherwise.
This commit is contained in:
parent
42050cfe83
commit
ab04cfc8d5
1 changed files with 5 additions and 1 deletions
|
|
@ -8,9 +8,13 @@
|
|||
- reload systemd config
|
||||
- restart git-annex
|
||||
|
||||
- name: Check if git-annex autostart file exists
|
||||
stat: path=/home/{{ user.name }}/.config/git-annex/autostart
|
||||
register: autostart
|
||||
|
||||
- name: Enable and start git-annex assistant service
|
||||
service: name="git-annex@{{ user.name }}.service" enabled=yes state=started
|
||||
when: gitannex is defined
|
||||
when: gitannex is defined and autostart.stat is defined and autostart.stat.size > 0
|
||||
|
||||
- name: Disable and stop git-annex assistant service
|
||||
service: name="git-annex@{{ user.name }}.service" enabled=no state=stopped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue