diff --git a/operations/deluge/tasks/conf.yml b/operations/deluge/tasks/conf.yml index 5cbb717..f95cf72 100644 --- a/operations/deluge/tasks/conf.yml +++ b/operations/deluge/tasks/conf.yml @@ -38,6 +38,7 @@ notify: Restart Deluge register: result -- name: Enabled service +- name: Enable service + # Needed to override SysV init. command: systemctl enable deluged when: result is changed diff --git a/operations/deluge/templates/service b/operations/deluge/templates/service index 1872e57..3016b21 100644 --- a/operations/deluge/templates/service +++ b/operations/deluge/templates/service @@ -1,13 +1,12 @@ [Unit] Description=Deluge Daemon -Documentation=man:deluged After=network-online.target [Service] Type=simple User={{ deluge.user }} Group={{ deluge.user }} -UMask=002 +WorkingDirectory={{ deluge.home }} ExecStart=/usr/bin/deluged -c {{ deluge.conf }} -d Restart=on-failure TimeoutStopSec=300 diff --git a/operations/opentracker/templates/service b/operations/opentracker/templates/service index 8df2831..2912f90 100644 --- a/operations/opentracker/templates/service +++ b/operations/opentracker/templates/service @@ -1,13 +1,14 @@ [Unit] Description=OpenTracker -After=network.target +After=network-online.target [Service] Type=simple User={{ opentracker.user }} -WorkingDirectory={{ opentracker.conf }} +Group={{ opentracker.user }} +WorkingDirectory={{ opentracker.home }} ExecStart=/usr/local/bin/opentracker -f "{{ opentracker.conf }}/config" -Restart=on-abort +Restart=on-failure [Install] WantedBy=multi-user.target