tazbug diff web/plugins/debug/debug.cgi @ rev 137
Update all plugins to use new storage paths
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Feb 22 14:59:49 2017 +0100 (2017-02-22) |
parents | 2499947037cf |
children |
line diff
1.1 --- a/web/plugins/debug/debug.cgi Tue Feb 21 16:39:16 2017 +0100 1.2 +++ b/web/plugins/debug/debug.cgi Wed Feb 22 14:59:49 2017 +0100 1.3 @@ -14,6 +14,7 @@ 1.4 cat << EOT 1.5 <div id="tools"> 1.6 <a href="$script?dashboard">Dashboard</a> 1.7 + <a href="$script?debug">Recheck</a> 1.8 </div> 1.9 <h2>Debug interface</h2> 1.10 <p> 1.11 @@ -23,6 +24,7 @@ 1.12 # Handle ?debug&del request 1.13 if [ "$(GET del)" ]; then 1.14 id="$(GET del)" 1.15 + set_bugdir "$id" 1.16 if [ -d "${bugdir}/${id}" ]; then 1.17 echo -n "<pre>Removing bug ID: $id... " 1.18 rm -rf ${bugdir}/${id} 1.19 @@ -32,8 +34,9 @@ 1.20 1.21 # Check for bug DB consistency 1.22 echo "<h3>Checking for bug.conf consistency</h3>" 1.23 - for id in $(ls $bugdir | sort -g) 1.24 + for id in $(ls_bugs | sort -g) 1.25 do 1.26 + set_bugdir "$id" 1.27 if [ $(cat ${bugdir}/${id}/bug.conf | wc -l) != 8 ]; then 1.28 echo "<pre>" 1.29 echo -n "ERROR: bug ID $id" 1.30 @@ -65,9 +68,10 @@ 1.31 echo "</pre>" 1.32 fi 1.33 fi 1.34 + bugdir=$(dirname $bugdir) 1.35 unset miss 1.36 done 1.37 - echo "$(ls -1 $bugdir | wc -l) bugs scanned" 1.38 + echo "$(ls_bugs | wc -l) bugs scanned" 1.39 1.40 # Check for messages consistency 1.41 echo "<h3>Checking for empty messages</h3>" 1.42 @@ -76,7 +80,7 @@ 1.43 if [ "$empty" ]; then 1.44 echo "<pre>" 1.45 cd ${bugdir} 1.46 - for msg in */msg.* 1.47 + for msg in */*/msg.* 1.48 do 1.49 if [ ! -s "$msg" ]; then 1.50 # Delete msg ?