sup rev 32
Server return packages.sql md5sum
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Feb 27 23:44:02 2017 +0100 (2017-02-27) |
parents | cfbb082f19f2 |
children | 454e319df9a6 |
files | server/sup/paths.conf server/sup/sup.cgi |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/server/sup/paths.conf Mon Feb 27 23:44:02 2017 +0100 1.3 @@ -0,0 +1,2 @@ 1.4 +host="http://scn.slitaz.org/" 1.5 +scn="/home/slitaz/www/scn"
2.1 --- a/server/sup/sup.cgi Mon Feb 27 23:01:43 2017 +0100 2.2 +++ b/server/sup/sup.cgi Mon Feb 27 23:44:02 2017 +0100 2.3 @@ -16,12 +16,13 @@ 2.4 if [ "$(basename $0)" == "sup.cgi" ]; then 2.5 . /lib/libtaz.sh 2.6 . /usr/lib/slitaz/httphelper.sh 2.7 + . paths.conf 2.8 fi 2.9 2.10 -host="http://scn.slitaz.org/" 2.11 -scn="/home/slitaz/www/scn" 2.12 -#host="http://localhost/~pankso/cgi-bin/scn/" 2.13 -#scn="/home/pankso/Public/cgi-bin/scn" 2.14 +# Custom paths.conf for easier development /avois commit this file 2.15 +# with wrong paths like Pankso does! Full paths are needed for upload 2.16 +# to work properly. 2.17 +[ -f "${plugins}/sup/paths.conf" ] && . ${plugins}/sup/paths.conf 2.18 2.19 supdb="$content/sup" 2.20 wok="$supdb/wok" 2.21 @@ -257,6 +258,10 @@ 2.22 </body> 2.23 </html>" 2.24 rm -rf ${cache} $(dirname $tmpfile) && exit 0 ;; 2.25 + 2.26 + *\ dbsum\ *) 2.27 + # Used by client to check for newer packages.sql 2.28 + md5sum ${pkgsdb} | awk '{printf $1}'; exit 0 ;; 2.29 2.30 *\ admin\ *|*\ db\ *) 2.31 . ${plugins}/sup/sup-admin.cgi ;;