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

Too many global vars: put {{ systemctl_program }} to rest

This commit is contained in:
root 2022-12-26 16:03:19 -05:00
parent 0125554869
commit 37f7d3eeaf
3 changed files with 3 additions and 4 deletions

View file

@ -57,6 +57,5 @@ kiwix_url: /kiwix
kiwix_url_plus_slash: "{{ kiwix_url }}/" # /kiwix/
kiwix_path: "{{ iiab_base }}/kiwix" # /opt/iiab/kiwix
systemctl_program: /bin/systemctl
kiwix_nginx_timeout: 600
kiwix_threads: 4

View file

@ -26,7 +26,7 @@
- name: Make a crontab entry to restart kiwix-serve at 4AM (debuntu)
lineinfile:
# mn hr dy mo day-of-week[Sunday=0] username command-to-be-executed
line: "0 4 * * * root /bin/systemctl restart kiwix-serve.service"
line: "0 4 * * * root /usr/bin/systemctl restart kiwix-serve.service"
dest: /etc/crontab
when: kiwix_enabled

View file

@ -25,12 +25,12 @@ if flock -n -e 200; then :
else
/usr/bin/iiab-make-kiwix-lib.py -f # force rebuild of library.xml
fi
{{ systemctl_program }} stop kiwix-serve
/usr/bin/systemctl stop kiwix-serve
if [ -f $KIWIXLIB ]; then
rm $KIWIXLIB
fi
mv $KIWIXLIB.tmp $KIWIXLIB
{{ systemctl_program }} start kiwix-serve
/usr/bin/systemctl start kiwix-serve
else
echo "Can't get wait lock for iiab-make-kiwix-lib.py";
exit 1;