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:
parent
0a3b9e759a
commit
f640eb24fe
1 changed files with 11 additions and 8 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue