Skip to content

Commit 6a52f2b

Browse files
committed
[kiwix] test setup without systemd-less
1 parent 0352618 commit 6a52f2b

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

roles/kiwix/tasks/enable-or-disable.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,35 @@
1414
name: kiwix-serve
1515
enabled: yes
1616
state: started
17-
when: kiwix_enabled
17+
when:
18+
- kiwix_enabled
19+
- not is_proot
20+
21+
- name: Check if kiwix-serve is already listening (proot)
22+
wait_for:
23+
host: 127.0.0.1
24+
port: "{{ kiwix_port }}"
25+
timeout: 1
26+
state: started
27+
register: kiwix_port_up
28+
ignore_errors: true
29+
when:
30+
- kiwix_enabled
31+
- is_proot
1832

33+
- name: Start kiwix-serve (proot)
34+
command: >
35+
{{ iiab_base }}/kiwix/bin/kiwix-serve
36+
--daemon
37+
--port {{ kiwix_port }}
38+
--nolibrarybutton
39+
--library {{ kiwix_library_xml }}
40+
--urlRootLocation={{ kiwix_url_plus_slash }}
41+
--threads {{ kiwix_threads }}
42+
when:
43+
- kiwix_enabled
44+
- is_proot
45+
- kiwix_port_up is failed
1946

2047
# In the past kiwix-serve did not stay running, so we'd been doing this hourly.
2148
# @mgautierfr & others suggest kiwix-serve might be auto-restarted w/o cron in

0 commit comments

Comments
 (0)