slitaz-forge rev 454
mirror: add cmd to update website and add SHell CGI support
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Feb 16 20:41:06 2014 +0100 (2014-02-16) |
parents | 6380f08f1346 |
children | 44848aae0a05 |
files | mirror/files/etc/lighttpd/vhosts.conf mirror/mirror |
line diff
1.1 --- a/mirror/files/etc/lighttpd/vhosts.conf Sun Feb 16 18:48:04 2014 +0100 1.2 +++ b/mirror/files/etc/lighttpd/vhosts.conf Sun Feb 16 20:41:06 2014 +0100 1.3 @@ -101,29 +101,18 @@ 1.4 index-file.names += ( "index.php" ) 1.5 } 1.6 1.7 -# slitaz.org 1.8 +# www.slitaz.org 1.9 # 1.10 -#$HTTP["host"] =~ "(^|www\.)slitaz\.(org|com|eu)$" { 1.11 $HTTP["host"] =~ "^www\.slitaz\.(org|com|eu)$" { 1.12 - server.document-root = "/home/slitaz/website" 1.13 + server.document-root = "/home/slitaz/repos/website" 1.14 server.errorlog = "/var/log/lighttpd/slitaz.org-error.log" 1.15 accesslog.filename = "/var/log/lighttpd/slitaz.org-access.log" 1.16 include "awstats.conf" 1.17 - 1.18 -### index-file.names = ( "index.html" ) 1.19 -### index-file.names += ( "start.html" ) 1.20 + index-file.names += ( "index.cgi" ) 1.21 index-file.names += ( "index.php" ) 1.22 - 1.23 - 1.24 -### url.rewrite-once = ( 1.25 -### "^/about" => "/fr/about", 1.26 -### "^/artwork" => "/fr/artwork", 1.27 -### "^/devel" => "/fr/devel", 1.28 -### "^/doc" => "/fr/doc", 1.29 -### "^/get" => "/fr/get", 1.30 -### "^/packages" => "/fr/packages" 1.31 -### ) 1.32 - 1.33 + cgi.assign = ( 1.34 + ".cgi" => "/bin/sh" 1.35 + ) 1.36 } 1.37 1.38 # doc.slitaz.org 1.39 @@ -226,16 +215,3 @@ 1.40 alias.url += ( "/static" => "/var/www/slitaz/mirror/static/" ) 1.41 index-file.names += ( "index.php" ) 1.42 } 1.43 - 1.44 -# mf.slitaz.org 1.45 -# 1.46 -# Mirror Files serve SliTaz static files such as CSS and images 1.47 -# Here we point the vhost to the Hg repo so we can update files via 1.48 -# cron: hg pull -u /home/slitaz/repos/slitaz-forge 1.49 -# 1.50 -$HTTP["host"] =~ "^mf\.slitaz\.org$" { 1.51 - server.document-root = "/home/slitaz/repos/slitaz-forge/mf" 1.52 - server.errorlog = "/var/log/lighttpd/mf.slitaz.org-error.log" 1.53 - accesslog.filename = "/var/log/lighttpd/mf.slitaz.org-access.log" 1.54 - include "awstats.conf" 1.55 -}
2.1 --- a/mirror/mirror Sun Feb 16 18:48:04 2014 +0100 2.2 +++ b/mirror/mirror Sun Feb 16 20:41:06 2014 +0100 2.3 @@ -13,6 +13,7 @@ 2.4 INFO="$WWW/mirror-info" 2.5 TINY="$WWW/pizza/tiny" 2.6 BACKUPS="/home/backups" 2.7 +WEBSITE="/home/slitaz/website" 2.8 2.9 usage() { 2.10 cat << EOT 2.11 @@ -22,7 +23,8 @@ 2.12 up-info Update mirror.slitaz.org/info/ web interface 2.13 up-tiny Update tiny.slitaz.org/ web interface 2.14 up-mirror Update mirror.slitaz.org files 2.15 - up-pkgs Update pkgs.slitaz.org 2.16 + up-www Update main website www.slitaz.org 2.17 + up-pkgs Update pkgs.slitaz.org web interface 2.18 2.19 EOT 2.20 } 2.21 @@ -43,6 +45,9 @@ 2.22 cd $REPOS/slitaz-forge && hg pull -u 2.23 echo "Copying root to: $MIRROR" 2.24 cp -a mirror/root/* $MIRROR ;; 2.25 + up-www) 2.26 + echo "Updating: www.slitaz.org" 2.27 + cd $WEBSITE && hg pull -u ;; 2.28 up-pkgs) 2.29 echo "Updating: pkgs.slitaz.org..." 2.30 cd $REPOS/slitaz-forge && hg pull -u