aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-09 21:35:05 -0500
committerB Stack <bgstack15@gmail.com>2020-12-09 21:35:05 -0500
commitfae813e25cb89b8b8f329e56c317b30c4f3edecd (patch)
tree6d6f610e3f4deb11746a809c4f336108f1eb59e0 /config
parentfix init script and pidfile ownership (diff)
downloadhex-zero-fae813e25cb89b8b8f329e56c317b30c4f3edecd.tar.gz
hex-zero-fae813e25cb89b8b8f329e56c317b30c4f3edecd.tar.bz2
hex-zero-fae813e25cb89b8b8f329e56c317b30c4f3edecd.zip
add check-for-short_url and fix init user check
Diffstat (limited to 'config')
-rwxr-xr-xconfig/hex-zero.init8
1 files changed, 8 insertions, 0 deletions
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
bgstack15