juci-update: make it possible to run local server again
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Mon, 25 Jun 2018 12:33:40 +0000 (14:33 +0200)
committerSukru Senli <sukru.senli@inteno.se>
Sat, 1 Sep 2018 09:23:00 +0000 (11:23 +0200)
scripts/juci-update

index b2c8651..2810a07 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/sh
 
-. /lib/functions.sh
 
 set -e
 
@@ -51,9 +50,14 @@ for file in `find ${WWW}/js -name "$JS_WILDCARD" | sort`; do
        SCRIPTS_HTML="${SCRIPTS_HTML}<script src=\"${JSFILE}?v=${time}\"></script>"
 done
 
-config_load juci
+if [ -f /lib/functions.sh ]; then
+       . /lib/functions.sh
 
-config_get favicon juci favicon "favicon.ico"
+       config_load juci
+       config_get favicon juci favicon "favicon.ico"
+else
+       favicon="favicon.ico"
+fi
 
 echo "<!doctype html>
 <html lang='en' >