1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

never fail during "systemctl stop calibre-serve" (even if service doesn't exist!)

This commit is contained in:
A Holt 2017-11-20 05:27:02 -05:00 committed by GitHub
parent 0a3b9e759a
commit f640eb24fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,19 +11,22 @@
when: is_rpi when: is_rpi
#when: is_rpi or is_debian #is_debian apparently also covers is_rpi #when: is_rpi or is_debian #is_debian apparently also covers is_rpi
# 2. STOP CALIBRE SERVICE IF IT EXISTS (REQUIRED FOR DATABASE ACTIVITY...AND IF not calibre_enabled) # 2. STOP CALIBRE SERVICE IF IT EXISTS (REQUIRED FOR DB ACTIVITY...AND IF not calibre_enabled)
- name: Check if Calibre systemd service exists #- name: Check if Calibre systemd service exists
stat: # stat:
path: /etc/systemd/system/calibre-serve.service # path: /etc/systemd/system/calibre-serve.service
register: calibre_svc # register: calibre_svc
- name: Disable Calibre service -- stops calibre-server by Kovid Goyal - name: Stop Calibre service -- calibre-server by Kovid Goyal
# systemd:
service: service:
name: calibre-serve name: calibre-serve
#enabled: no
state: stopped state: stopped
when: calibre_svc.stat.exists #enabled: no
# register: command_result # gist.github.com/tyrells/0a79681de339237cb04c
failed_when: false # Never Fail during "systemctl stop calibre-serve" (even if service doesn't exist!)
# when: calibre_svc.stat.exists
# 3. CREATE DATABASE WITH A SAMPLE BOOK (REQUIRED AS OF CALIBRE 3.x) # 3. CREATE DATABASE WITH A SAMPLE BOOK (REQUIRED AS OF CALIBRE 3.x)