Browse Source

remove trailing slashes from config paths; fixing variable typo

mxmehl 3 years ago
parent
commit
76a5a5bcd7
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      fsfe-preview.sh

+ 8
- 1
fsfe-preview.sh View File

@@ -29,6 +29,7 @@ ROOT=$(dirname "$(readlink -f "$0")")
29 29
 if [ ! -e "$ROOT"/config.cfg ]; then echo "Missing config.cfg file. Edit and rename config.cfg.sample"; exit 1; fi
30 30
 source "$ROOT"/config.cfg
31 31
 
32
+# Help listing
32 33
 if [ "$1" = "" ]; then
33 34
   self=$(basename $0) 
34 35
   echo "No parameters or variables given!"
@@ -45,6 +46,12 @@ if [ "$1" = "" ]; then
45 46
   exit 0
46 47
 fi
47 48
 
49
+# Remove trailing slashes
50
+LOC_trunk=$(echo $LOC_trunk | sed 's|/$||')
51
+LOC_out=$(echo $LOC_out | sed 's|/$||')
52
+LOC_trunk_dev=$(echo $LOC_trunk_dev | sed 's|/$||')
53
+
54
+# Pure copy
48 55
 if [ "$1" = "--copy" ]; then
49 56
   numargs=$(($# - 1))
50 57
   echo "[INFO] Starting a plain mass copy with $numargs files..."
@@ -105,7 +112,7 @@ fi
105 112
 ### START WEBSERVER if necessary
106 113
 if [ ! $(pgrep lighttpd) ]; then
107 114
   echo "[INFO] Starting webserver"
108
-  /usr/sbin/lighttpd -f $HTTPDST_conf
115
+  /usr/sbin/lighttpd -f $HTTPD_conf
109 116
 else
110 117
   echo "[INFO] Webserver already seems to be running."
111 118
 fi

Loading…
Cancel
Save