From fae813e25cb89b8b8f329e56c317b30c4f3edecd Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 9 Dec 2020 21:35:05 -0500 Subject: add check-for-short_url and fix init user check --- config/hex-zero.init | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/hex-zero.init b/config/hex-zero.init index 18dbf60..46bb29c 100755 --- a/config/hex-zero.init +++ b/config/hex-zero.init @@ -54,6 +54,14 @@ do_start() #su $USER -c "$DAEMON" & # The above code will not work for interpreted scripts, use the next # six lines below instead (Ref: #643337, start-stop-daemon(8) ) + test -r /var/www/0x0/check-for-short_url.sh && { + /bin/sh /var/www/0x0/check-for-short_url.sh || { + # the init script is somehow prevent all displayed output even when directly outputing it to /dev/pts/3 + echo "Please run something similar to the following, before running hex-zero:" + echo "sudo su ${USER} -c 'pip3 --user install short_url'" + exit 1 + } + } start-stop-daemon --start --pidfile $PIDFILE --startas $DAEMON \ --name uwsgi_python3 --test > /dev/null \ || return 1 -- cgit