slitaz-modular annotate initramfs/usr/bin/local-mirror @ rev 144

local-mirror: Copy tank files so makegraphs will work when home boot option is used.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Nov 11 07:38:12 2011 +0000 (2011-11-11)
parents e9ccf6ee0ae4
children 6ae8e01ab09d
rev   line source
slaxemulator@30 1 #!/bin/sh
slaxemulator@30 2
slaxemulator@32 3 source /usr/lib/slitaz/libtaz
slaxemulator@32 4 source_lib commons
slaxemulator@32 5 check_root
slaxemulator@79 6 . /etc/slitaz/slitaz.conf
slaxemulator@32 7
slaxemulator@30 8 . /etc/local-mirror.conf
slaxemulator@30 9
slaxemulator@112 10 COMMAND="$1"
slaxemulator@32 11 VERSION="0.1"
slaxemulator@32 12 usage() {
slaxemulator@32 13 echo "$0 $VERSION"
slaxemulator@46 14 echo "$0 [on|off|update-repos|tank-only|mirror-only]"
slaxemulator@101 15 echo "$0 [backup-mirror|up-src-links]"
slaxemulator@32 16 exit 1
slaxemulator@32 17 }
slaxemulator@32 18
slaxemulator@101 19 #[ -d /mnt/live/memory/mirror/packages ] && PKGDIR="/mnt/live/memory/mirror/packages"
slaxemulator@101 20 #[ -d /mnt/live/memory/mirror/src ] && SRCDIR="/mnt/live/memory/mirror/src"
slaxemulator@144 21 sync_mirror=$(find /mnt/live -maxdepth 3 -name "mirror" -type d | head -1)
slaxemulator@101 22
slaxemulator@144 23 COOKORDER="$(find /mnt/live/mnt/* -maxdepth 1 -name "cookorder.list")"
slaxemulator@80 24 CUR_PWD="$PWD"
slaxemulator@112 25 version="$(cat /etc/slitaz-release)"
slaxemulator@80 26
slaxemulator@112 27 [ -d $SLITAZ_DIR/$version ] || mkdir -p $SLITAZ_DIR/$version
slaxemulator@101 28 [ -d $SLITAZ_DIR/repos ] || ln -sf $REPOS_DIR $SLITAZ_DIR/repos
slaxemulator@89 29 [ -d $SLITAZ_DIR/repos ] && REPOS_DIR="$SLITAZ_DIR/repos"
slaxemulator@89 30
slaxemulator@138 31 if [ -d $PKGDIR ]; then
slaxemulator@138 32 [ -d $SLITAZ_DIR/$version/packages ] || ln -sf $PKGDIR $SLITAZ_DIR/$version/packages
slaxemulator@138 33 [ -d $SLITAZ_DIR/packages ] || ln -sf $PKGDIR $SLITAZ_DIR/packages
slaxemulator@138 34 fi
slaxemulator@138 35 if [ -d $SRCDIR ]; then
slaxemulator@138 36 [ -d $SLITAZ_DIR/$version/src ] || ln -sf $SRCDIR $SLITAZ_DIR/$version/src
slaxemulator@138 37 [ -d $SLITAZ_DIR/src ] || ln -sf $SRCDIR $SLITAZ_DIR/src
slaxemulator@138 38 fi
slaxemulator@138 39
slaxemulator@89 40 #repos folders for website
slaxemulator@89 41 PEOPLE_WWW_DIR="$REPOS_DIR/slitaz-forge/people"
slaxemulator@89 42 DOC_WWW_DIR="$REPOS_DIR/slitaz-forge/doc"
slaxemulator@89 43 PIZZA_WWW_DIR="$REPOS_DIR/slitaz-pizza/php"
slaxemulator@89 44 BOOT_WWW_DIR="$REPOS_DIR/slitaz-forge/boot"
slaxemulator@89 45 TANK_WWW_DIR="$REPOS_DIR/slitaz-forge/tank/web"
slaxemulator@89 46
slaxemulator@36 47 if [ "$COMMAND" = "tank-only" ]; then
slaxemulator@36 48 WWW="${WWW/mirror/}"
slaxemulator@36 49 ADDRESS="${ADDRESS/mirror.slitaz.org/}"
slaxemulator@36 50 VHOST_FILE="$VHOST_TANK_FILE"
slaxemulator@36 51 fi
slaxemulator@36 52
slaxemulator@36 53 if [ "$COMMAND" = "mirror-only" ]; then
slaxemulator@36 54 WWW="${WWW/tank/}"
slaxemulator@36 55 ADDRESS="mirror.slitaz.org"
slaxemulator@36 56 VHOST_FILE="$VHOST_MIRROR_FILE"
slaxemulator@36 57 fi
slaxemulator@36 58
slaxemulator@138 59 if [ ! -d $PKGDIR ]; then
slaxemulator@138 60 WWW="${WWW/pkg/}"
slaxemulator@138 61 ADDRESS="${ADDRESS/pkg.slitaz.org}"
slaxemulator@138 62 fi
slaxemulator@30 63 [ -d $REPOS_DIR ] || continue
slaxemulator@32 64
slaxemulator@102 65 INCOMING_REPOSITORY="$COOKING/packages-incoming"
slaxemulator@115 66 INCOMING="$SLITAZ_DIR/$version/incoming"
slaxemulator@89 67 CRON_FILE="/var/spool/cron/crontabs/root"
slaxemulator@89 68
slaxemulator@32 69 www() {
slaxemulator@32 70 b=$1
slaxemulator@101 71 [ -d $(dirname $CRON_FILE) ] || mkdir -p $(dirname $CRON_FILE)
slaxemulator@101 72 [ -f $CRON_FILE ] || touch $CRON_FILE
slaxemulator@101 73 [ -d $MAIN_WWW_DIR ] || mkdir -p $MAIN_WWW_DIR
slaxemulator@101 74 [ -L /var/www/vhosts ] || ln -sf $MAIN_WWW_DIR /var/www/vhosts
slaxemulator@101 75
slaxemulator@110 76 if [ -d $REPOS_DIR/wok-tank ]; then
slaxemulator@110 77 REPO_WOK=$REPOS_DIR/wok-tank
slaxemulator@101 78 if [ -x /usr/bin/hg ]; then
slaxemulator@101 79 cd $REPO_WOK
slaxemulator@101 80 if [ ! "$(hg branch)" = "cooking" ]; then
slaxemulator@101 81 hg update cooking
slaxemulator@101 82 fi
slaxemulator@101 83 cd $CUR_PWD
slaxemulator@101 84 fi
slaxemulator@101 85 elif [ -d $REPOS_DIR/wok ]; then
slaxemulator@101 86 REPO_WOK=$REPOS_DIR/wok
slaxemulator@101 87 fi
slaxemulator@102 88 [ -d $STABLE ] || mkdir -p $STABLE
slaxemulator@102 89 [ -d $COOKING ] || mkdir -p $COOKING
slaxemulator@102 90
slaxemulator@34 91 case "$b" in
slaxemulator@34 92 website)
slaxemulator@46 93 [ -d $REPOS_DIR/$b ] && ln -s $REPOS_DIR/$b $MAIN_WWW_DIR
slaxemulator@108 94 if [ -f $MAIN_WWW_DIR/$b/libs/get-feeds.sh ]; then
slaxemulator@108 95 if [ ! $(grep -l "$MAIN_WWW_DIR/$b/libs/get-feeds.sh" $CRON_FILE) ]; then
slaxemulator@89 96 echo "#Update SliTaz stuff" >> $CRON_FILE
slaxemulator@108 97 echo "*/20 * * * * $MAIN_WWW_DIR/$b/libs/get-feeds.sh" >> $CRON_FILE
slaxemulator@89 98 fi
slaxemulator@89 99 fi
slaxemulator@34 100 ;;
slaxemulator@34 101 people)
slaxemulator@46 102 [ -d $REPOS_DIR/slitaz-forge/people ] && ln -s $REPOS_DIR/slitaz-forge/people $MAIN_WWW_DIR/people
slaxemulator@34 103 ;;
slaxemulator@34 104 doc)
slaxemulator@46 105 [ -d $DOC_WWW_DIR ] && cp -a $DOC_WWW_DIR $MAIN_WWW_DIR/doc
slaxemulator@46 106 [ -d /var/www/dokuwiki ] && cp -a /var/www/dokuwiki/* $MAIN_WWW_DIR/doc
slaxemulator@138 107 VAR="index attic meta media pages"
slaxemulator@34 108 for i in $VAR; do
slaxemulator@46 109 [ -d $REPOS_DIR/slitaz-doc-wiki-data ] && cp -a $REPOS_DIR/slitaz-doc-wiki-data/$i $MAIN_WWW_DIR/doc/data
slaxemulator@32 110 done
slaxemulator@138 111 #[ -d $REPOS_DIR/slitaz-doc-wiki-data/plugins ] && cp -a $REPOS_DIR/slitaz-doc-wiki-data/plugins $MAIN_WWW_DIR/doc/lib
slaxemulator@46 112 chown root.root -R $MAIN_WWW_DIR/doc
slaxemulator@46 113 chmod 777 -R $MAIN_WWW_DIR/doc
slaxemulator@34 114 ;;
slaxemulator@89 115 bugs)
slaxemulator@89 116 [ -d $SLITAZ_DIR/bugs ] || mkdir -p $SLITAZ_DIR/bugs
slaxemulator@89 117 [ -d $MAIN_WWW_DIR/bugs ] || mkdir -p $MAIN_WWW_DIR/bugs
slaxemulator@89 118 [ -d $REPOS_DIR/slitaz-forge/bugs ] && cp -a $REPOS_DIR/slitaz-forge/bugs/roundup.wsgi $SLITAZ_DIR/bugs/roundup.wsgi
slaxemulator@89 119 [ -d $REPOS_DIR/slitaz-forge/bugs ] && cp -a $REPOS_DIR/slitaz-forge/bugs/server.ini $SLITAZ_DIR/bugs/server.ini
slaxemulator@89 120 [ -d $REPOS_DIR/slitaz-forge/bugs/templates/slitaz ] && cp -a $REPOS_DIR/slitaz-forge/bugs/templates/slitaz/* $SLITAZ_DIR/bugs
slaxemulator@89 121 [ -f /usr/share/roundup/cgi-bin/roundup.cgi ] && ln -sf /usr/share/roundup/cgi-bin/roundup.cgi $MAIN_WWW_DIR/bugs/roundup.cgi
slaxemulator@89 122 ;;
slaxemulator@34 123 pizza)
slaxemulator@46 124 [ -d $PIZZA_WWW_DIR ] && ln -sf $PIZZA_WWW_DIR $MAIN_WWW_DIR/pizza
slaxemulator@34 125 ;;
slaxemulator@34 126 bb)
slaxemulator@46 127 [ -d /usr/share/slitaz/web-bb ] && cp -a /usr/share/slitaz/web-bb $MAIN_WWW_DIR/bb
slaxemulator@46 128 #[ -d /usr/share/slitaz/web ] && cp -a /usr/share/slitaz/web $MAIN_WWW_DIR/bb/web
slaxemulator@89 129 [ -d $REPOS_DIR/website/images ] && ln -sf $REPOS_DIR/website/images $MAIN_WWW_DIR/bb/images
slaxemulator@80 130 [ -d $INCOMING_REPOSITORY ] || mkdir -p $INCOMING_REPOSITORY
slaxemulator@80 131 [ -f $INCOMING_REPOSITORY/packages.desc ] || touch $INCOMING_REPOSITORY/packages.desc
slaxemulator@80 132 [ -f $INCOMING_REPOSITORY/packages.equiv ] || touch $INCOMING_REPOSITORY/packages.equiv
slaxemulator@80 133 [ -f $INCOMING_REPOSITORY/packages.list ] || touch $INCOMING_REPOSITORY/packages.list
slaxemulator@80 134 [ -f $INCOMING_REPOSITORY/packages.md5 ] || touch $INCOMING_REPOSITORY/packages.md5
slaxemulator@80 135 [ -f $INCOMING_REPOSITORY/packages.txt ] || touch $INCOMING_REPOSITORY/packages.txt
slaxemulator@102 136 [ -d $PKGDIR ] && ln -sf $PKGDIR $COOKING/packages
slaxemulator@102 137 [ -d $SRCDIR ] && ln -sf $SRCDIR $COOKING/src
slaxemulator@89 138 if [ "$CUSTOM_WOK" = "yes" ]; then
slaxemulator@89 139 tazwok gen-wok-db --WOK=$REPO_WOK
slaxemulator@89 140 if [ -f $COOKORDER ]; then
slaxemulator@89 141 [ -d $COOKING/wok ] || mkdir -p $COOKING/wok
slaxemulator@89 142 [ -d $COOKING/clean-wok ] || mkdir -p $COOKING/clean-wok
slaxemulator@89 143 cat $COOKORDER | while read pkg; do
slaxemulator@89 144 rwanted=$(grep $'\t'$pkg$ $INCOMING_REPOSITORY/wok-wanted.txt | cut -f 1)
slaxemulator@89 145 for i in $rwanted; do
slaxemulator@89 146 [ -f $COOKING/clean-wok/$i/receipt ] || cp -a $REPO_WOK/$i $COOKING/clean-wok/$i
slaxemulator@89 147 [ -f $COOKING/wok/$i/receipt ] || cp -a $REPO_WOK/$i $COOKING/wok/$i
slaxemulator@89 148 done
slaxemulator@89 149 [ -f $COOKING/clean-wok/$pkg/receipt ] || cp -a $REPO_WOK/$pkg $COOKING/clean-wok/$pkg
slaxemulator@89 150 [ -f $COOKING/wok/$pkg/receipt ] || cp -a $REPO_WOK/$pkg $COOKING/wok/$pkg
slaxemulator@80 151 done
slaxemulator@89 152 unset i
slaxemulator@89 153 tazwok gen-wok-db --WOK=$COOKING/clean-wok
slaxemulator@89 154 fi
slaxemulator@80 155 else
slaxemulator@80 156 [ -d $COOKING/clean-wok ] || ln -sf $REPO_WOK $COOKING/clean-wok
slaxemulator@80 157 [ -d $COOKING/wok ] || ln -sf $REPO_WOK $COOKING/wok
slaxemulator@80 158 fi
slaxemulator@80 159 [ -d $STABLE/clean-wok ] || ln -sf $REPOS_DIR/wok-stable $STABLE/clean-wok
slaxemulator@46 160 [ -d $STABLE/wok ] || ln -sf $REPOS_DIR/wok-stable $STABLE/wok
slaxemulator@80 161 [ -f $SRCDIR/sources.list ] || tazwok gen-src $SRCDIR --WOK=$REPO_WOK
slaxemulator@54 162 [ -d $REPOS_DIR/slitaz-modular ] && ln -sf $REPOS_DIR/slitaz-modular $COOKING/slitaz-modular
slaxemulator@46 163 echo -e "$MAIN_WWW_DIR/bb" | tazwok webserver on
slaxemulator@34 164 ;;
slaxemulator@112 165 cook)
slaxemulator@115 166 #pwd=$(pwd)
slaxemulator@115 167 #if [ -d $REPOS_DIR/my-cookutils ]; then
slaxemulator@115 168 # cd $REPOS_DIR/my-cookutils
slaxemulator@115 169 # if [ "$(hg branch)" != "testing" ]; then
slaxemulator@115 170 # hg update testing
slaxemulator@115 171 # fi
slaxemulator@115 172 # make install
slaxemulator@115 173 # cd $pwd
slaxemulator@115 174 #fi
slaxemulator@124 175 echo "$SLITAZ_DIR/$version/packages" > $LOCALSTATE/mirror
slaxemulator@115 176 [ -d $LOCALSTATE/undigest/incoming ] || mkdir -p $LOCALSTATE/undigest/incoming
slaxemulator@115 177 [ -f $LOCALSTATE/undigest/incoming/mirror ] || echo "$INCOMING" > $LOCALSTATE/undigest/incoming/mirror
slaxemulator@121 178 echo "incoming" > $LOCALSTATE/priority
slaxemulator@115 179 [ -d $SLITAZ_DIR/$version/incoming ] || mkdir -p $SLITAZ_DIR/$version/incoming
slaxemulator@115 180 [ -d /var/www/cooker ] && cp -a /var/www/cooker $MAIN_WWW_DIR/cook
slaxemulator@115 181 [ -f /usr/share/cook/header.html ] && cp -a /usr/share/cook/header.html $MAIN_WWW_DIR/cook/header.html
slaxemulator@112 182 if [ "$MKCHROOT" = "yes" ]; then
slaxemulator@138 183 if [ -d $PKGDIR ]; then
slaxemulator@142 184 tazpkg recharge
slaxemulator@138 185 tazdev gen-chroot $version
slaxemulator@138 186 [ -d $SLITAZ_DIR/$version/chroot ] && mkdir -p $SLITAZ_DIR/$version/chroot$(dirname $CRON_FILE)
slaxemulator@138 187 [ -d $SLITAZ_DIR/$version/chroot ] && echo "0 */2 * * * /usr/bin/cooker" > $SLITAZ_DIR/$version/chroot${CRON_FILE}
slaxemulator@138 188 [ -d $SLITAZ_DIR/$version/chroot ] && echo "$SLITAZ_DIR/$version/packages" > $SLITAZ_DIR/$version/chroot${LOCALSTATE}/mirror
slaxemulator@138 189 mkdir -p $SLITAZ_DIR/$version/chroot${LOCALSTATE}/undigest/incoming
slaxemulator@138 190 echo "$SLITAZ_DIR/$version/incoming" > $SLITAZ_DIR/$version/chroot${LOCALSTATE}/undigest/incoming/mirror
slaxemulator@138 191 fi
slaxemulator@112 192 fi
slaxemulator@112 193 [ -d $REPOS_DIR/wok-tank ] && ln -sf $REPOS_DIR/wok-tank $SLITAZ_DIR/$version/wok-hg
slaxemulator@112 194 #[ -d $REPOS_DIR/wok-tank ] && ln -sf $REPOS_DIR/wok-tank $SLITAZ_DIR/$version/wok
slaxemulator@115 195 [ -d $MAIN_WWW_DIR/cook/packages ] || ln -sf $SLITAZ_DIR/$version/packages $MAIN_WWW_DIR/cook/packages
slaxemulator@115 196 [ -d $MAIN_WWW_DIR/cook/incoming ] || ln -sf $SLITAZ_DIR/$version/incoming $MAIN_WWW_DIR/cook/incoming
slaxemulator@112 197 ;;
slaxemulator@34 198 pkgs)
slaxemulator@46 199 [ -d $MAIN_WWW_DIR/pkgs ] || mkdir -p $MAIN_WWW_DIR/pkgs
slaxemulator@112 200 pwd=$(pwd)
slaxemulator@142 201 #if [ -d $REPOS_DIR/slitaz-dev-tools/tazpkg-web ]; then
slaxemulator@142 202 # cd $REPOS_DIR/slitaz-dev-tools/tazpkg-web
slaxemulator@142 203 # make install
slaxemulator@142 204 # cd $pwd
slaxemulator@142 205 #fi
slaxemulator@142 206 [ -d /var/lib/tazpkg-web/style ] && cp -a /var/lib/tazpkg-web/style/* $MAIN_WWW_DIR/pkgs
slaxemulator@142 207 [ -f /var/lib/tazpkg-web/search.cgi ] && cp -a /var/lib/tazpkg-web/search.cgi $MAIN_WWW_DIR/pkgs
slaxemulator@142 208 #[ -d $REPOS_DIR/slitaz-dev-tools/tazpkg-web/style ] && cp -a $REPOS_DIR/slitaz-dev-tools/tazpkg-web/style/* $MAIN_WWW_DIR/pkgs
slaxemulator@142 209 #[ -f $REPOS_DIR/slitaz-dev-tools/tazpkg-web/search.cgi ] && cp -a $REPOS_DIR/slitaz-dev-tools/tazpkg-web/search.cgi $MAIN_WWW_DIR/pkgs
slaxemulator@34 210 [ -d $REPOS_DIR/flavors ] && ln -sf $REPOS_DIR/flavors $COOKING/flavors
slaxemulator@112 211 #[ -d $REPOS_DIR/flavors-stable ] && ln -sf $REPOS_DIR/flavors-stable $STABLE/flavors
slaxemulator@80 212 #[ -d $COOKING/wok ] || ln -sf $REPOS_DIR/wok $COOKING/clean-wok
slaxemulator@112 213 #[ -d $STABLE/clean-wok ] || ln -sf $REPOS_DIR/wok-stable $STABLE/clean-wok
slaxemulator@97 214 if [ -f "/usr/bin/tazpkg-web" ]; then
slaxemulator@97 215 tazpkg-web cooking
slaxemulator@97 216 if [ ! $(grep -l "/usr/bin/tazpkg-web cooking" $CRON_FILE) ]; then
slaxemulator@97 217 echo "# Update pkgs.slitaz.org pages" >> $CRON_FILE
slaxemulator@97 218 echo "20 02 * * * /usr/bin/tazpkg-web cooking" >> $CRON_FILE
slaxemulator@97 219 fi
slaxemulator@97 220 fi
slaxemulator@34 221 ;;
slaxemulator@34 222 mirror)
slaxemulator@46 223 [ -d $REPOS_DIR/slitaz-dev-tools/mirror-tools/mirror-info ] && cp -a $REPOS_DIR/slitaz-dev-tools/mirror-tools/mirror-info $MAIN_WWW_DIR
slaxemulator@46 224 [ -d $REPOS_DIR/slitaz-dev-tools/mirror-tools/slitaz ] && cp -a $REPOS_DIR/slitaz-dev-tools/mirror-tools/slitaz $MAIN_WWW_DIR
slaxemulator@46 225 [ -d $MAIN_WWW_DIR/slitaz/mirror/packages ] || mkdir -p $MAIN_WWW_DIR/slitaz/mirror/packages
slaxemulator@115 226 [ -d $PKGDIR ] && ln -sf $PKGDIR $MAIN_WWW_DIR/slitaz/mirror/packages/$version
slaxemulator@129 227 [ -d /var/www/slitaz ] || ln -sf $MAIN_WWW_DIR/slitaz /var/www/slitaz
slaxemulator@129 228 [ -d /var/www/mirror-info ] || ln -sf $MAIN_WWW_DIR/mirror-info /var/www/mirror-info
slaxemulator@129 229 if [ -f /var/www/mirror-info/bin/makegraphs ]; then
slaxemulator@129 230 if [ ! $(grep -l "/var/www/mirror-info/bin/makegraphs" $CRON_FILE) ]; then
slaxemulator@129 231 echo "# Update mirror system load graphics" >> $CRON_FILE
slaxemulator@129 232 echo "*/5 * * * * /var/www/mirror-info/bin/makegraphs" >> $CRON_FILE
slaxemulator@129 233 fi
slaxemulator@34 234 fi
slaxemulator@34 235 ;;
slaxemulator@34 236 boot)
slaxemulator@46 237 [ -d $BOOT_WWW_DIR ] && cp -a $BOOT_WWW_DIR $MAIN_WWW_DIR/$b
slaxemulator@89 238 #[ -d $REPOS_DIR/website/pics ] && ln -sf $REPOS_DIR/website/images $MAIN_WWW_DIR/$b/images
slaxemulator@34 239 ;;
slaxemulator@34 240 tank)
slaxemulator@144 241 [ -d $TANK_WWW_DIR ] && cp -a $TANK_WWW_DIR $MAIN_WWW_DIR/$b
slaxemulator@34 242 [ -f /usr/share/awstats/extras/update ] && ln -sf /usr/share/awstats/extras/update /usr/sbin/awsupdate_all
slaxemulator@34 243 [ -d $REPOS_DIR/slitaz-forge/$b/files/etc/awstats ] && cp -a $REPOS_DIR/slitaz-forge/$b/files/etc/awstats/* /etc/awstats
slaxemulator@34 244 for i in $ADDRESS; do
slaxemulator@34 245 if [ -f /etc/awstats/awstats.$i.conf ]; then
slaxemulator@34 246 dirlog=$(grep ^DirData= /etc/awstats/awstats.$i.conf | cut -d "=" -f2 | sed -e 's/"//g')
slaxemulator@34 247 mkdir -p $dirlog
slaxemulator@34 248 fi
slaxemulator@34 249 done
slaxemulator@97 250 if [ -f /usr/share/awstats/extras/update ]; then
slaxemulator@97 251 if [ ! $(grep -l "/usr/share/awstats/extras/update" $CRON_FILE) ]; then
slaxemulator@97 252 echo "# Update Web stats" >> $CRON_FILE
slaxemulator@97 253 echo "*/5 * * * * /usr/share/awstats/extras/update" >> $CRON_FILE
slaxemulator@97 254 fi
slaxemulator@97 255 fi
slaxemulator@97 256 if [ -f $MAIN_WWW_DIR/tank/bin/makegraphs ]; then
slaxemulator@97 257 if [ ! $(grep -l "$MAIN_WWW_DIR/tank/bin/makegraphs" $CRON_FILE) ]; then
slaxemulator@129 258 echo "# Update tank system load graphics" >> $CRON_FILE
slaxemulator@97 259 echo "*/5 * * * * $MAIN_WWW_DIR/tank/bin/makegraphs" >> $CRON_FILE
slaxemulator@97 260 fi
slaxemulator@97 261 fi
slaxemulator@34 262 ;;
slaxemulator@34 263 hg)
slaxemulator@46 264 [ -d $MAIN_WWW_DIR/hg ] || mkdir -p $MAIN_WWW_DIR/hg
slaxemulator@46 265 [ -f /usr/share/examples/mercurial/hgwebdir.cgi ] && cp -a /usr/share/examples/mercurial/hgwebdir.cgi $MAIN_WWW_DIR/hg
slaxemulator@142 266 [ -f /usr/share/examples/mercurial/hgwebdir.cgi ] && cp -a /usr/share/examples/mercurial/hgwebdir.cgi $MAIN_WWW_DIR/hg/hgwebdir.py
slaxemulator@142 267 [ -f $REPOS_DIR/slitaz-forge/tank/files/etc/mercurial/hgweb.config ] && cp -a $REPOS_DIR/slitaz-forge/tank/files/etc/mercurial/hgweb.config /etc/mercurial
slaxemulator@142 268 [ -f $REPOS_DIR/slitaz-forge/tank/files/etc/mercurial/hgweb.config-mirror ] && cp -a $REPOS_DIR/slitaz-forge/tank/files/etc/mercurial/hgweb.config-mirror /etc/mercurial
slaxemulator@142 269 sed -i 's|/etc/mercurial/hgweb.config|/etc/mercurial/hgweb.config-mirror|g' $MAIN_WWW_DIR/hg/hgwebdir.py
slaxemulator@34 270 #[ -f /etc/mercurial/hgweb.conf ] && sed -i 's|style = slitaz|style = gitweb|g' /etc/mercurial/hgweb.config
slaxemulator@34 271 ;;
slaxemulator@42 272 lfs)
slaxemulator@131 273 [ -d $MAIN_WWW_DIR/lfs ] || ln -sf /usr/share/doc/lfs-book $MAIN_WWW_DIR/lfs ;;
slaxemulator@131 274 hgbook)
slaxemulator@131 275 if [ -d /usr/share/hgbook ]; then
slaxemulator@131 276 [ -d $MAIN_WWW_DIR/hgbook ] || ln -sf /usr/share/hgbook $MAIN_WWW_DIR/hgbook
slaxemulator@131 277 fi ;;
slaxemulator@131 278 absguide)
slaxemulator@131 279 if [ -d /usr/share/absguide ]; then
slaxemulator@131 280 [ -d $MAIN_WWW_DIR/absguide ] || ln -sf /usr/share/absguide $MAIN_WWW_DIR/absguide
slaxemulator@131 281 fi ;;
slaxemulator@131 282 gimp.en)
slaxemulator@131 283 if [ -d /usr/share/gimp/2.0/help/en ]; then
slaxemulator@131 284 [ -d $MAIN_WWW_DIR/gimp_en ] || ln -sf /usr/share/gimp/2.0/help/en $MAIN_WWW_DIR/gimp_en
slaxemulator@131 285 fi ;;
slaxemulator@131 286 gimp.fr)
slaxemulator@131 287 if [ -d /usr/share/gimp/2.0/help/fr ]; then
slaxemulator@131 288 [ -d $MAIN_WWW_DIR/gimp_fr ] || ln -sf /usr/share/gimp/2.0/help/fr $MAIN_WWW_DIR/gimp_fr
slaxemulator@131 289 fi ;;
slaxemulator@131 290 gimp.es)
slaxemulator@131 291 if [ -d /usr/share/gimp/2.0/help/es ]; then
slaxemulator@131 292 [ -d $MAIN_WWW_DIR/gimp_es ] || ln -sf /usr/share/gimp/2.0/help/es $MAIN_WWW_DIR/gimp_es
slaxemulator@131 293 fi ;;
slaxemulator@34 294 esac
slaxemulator@32 295 }
slaxemulator@30 296
slaxemulator@32 297 repos() {
slaxemulator@32 298 for repo in $REPOS; do
slaxemulator@32 299 [ -d $REPOS_DIR/$repo ] || continue
slaxemulator@36 300 if [ -d $REPOS_DIR/$repo/.hg ]; then
slaxemulator@36 301 mkdir -p $REPOS_WEB_DIR/$repo
slaxemulator@36 302 [ -d $REPOS_WEB_DIR/$repo/.hg ] || ln -s $REPOS_DIR/$repo/.hg $REPOS_WEB_DIR/$repo/.hg
slaxemulator@36 303 if [ ! $(grep -l "$REPOS_WEB_DIR" /etc/mercurial/hgweb.config) ]; then
slaxemulator@36 304 [ -f /etc/mercurial/hgweb.config ] && sed -i "s|$REPOS_DIR|$REPOS_WEB_DIR|g" /etc/mercurial/hgweb.config
slaxemulator@36 305 fi
slaxemulator@36 306 fi
slaxemulator@32 307 if [ ! -f $REPOS_DIR/$repo/.hg/hgrc-web ]; then
slaxemulator@36 308 touch $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@97 309 cat "$REPOS_DIR/$repo/.hg/hgrc" >> $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@36 310 echo "[web]" >> $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@36 311 #[ -d $REPOS_DIR/$repo/.hg ] && echo "style = slitaz" >> $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@36 312 echo "staticurl = http://hg.slitaz.org/static/" >> $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@36 313 echo "push_ssl = false" >> $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@36 314 echo "allow_push = *" >> $REPOS_DIR/$repo/.hg/hgrc-web
slaxemulator@36 315 #[ ! -f $REPOS_DIR/$repo/.hg/hgrc-pull ] && mv $REPOS_DIR/$repo/.hg/hgrc $REPOS_DIR/$repo/.hg/hgrc-pull
slaxemulator@36 316 cp -a $REPOS_DIR/$repo/.hg/hgrc-web $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 317 fi
slaxemulator@30 318
slaxemulator@32 319 if [ ! $(grep -l 'name = ' $REPOS_DIR/$repo/.hg/hgrc ) ]; then
slaxemulator@32 320 echo "name = $repo" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 321 fi
slaxemulator@30 322
slaxemulator@32 323 if [ ! $(grep -l 'contact = ' $REPOS_DIR/$repo/.hg/hgrc ) ]; then
slaxemulator@97 324 [ "$repo" = "cookutils" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@112 325 [ "$repo" = "my-cookutils" ] && echo "contact = Christopher Rogers" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 326 [ "$repo" = "flavors" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 327 [ "$repo" = "flavors-stable" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 328 [ "$repo" = "slitaz-base-files" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 329 [ "$repo" = "slitaz-boot-scripts" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 330 [ "$repo" = "slitaz-configs" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 331 [ "$repo" = "slitaz-dev-tools" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 332 [ "$repo" = "slitaz-doc" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 333 [ "$repo" = "slitaz-doc-wiki-data" ] && echo "contact = Christopher Rogers" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 334 [ "$repo" = "slitaz-forge" ] && echo "contact = Eric Joseph-Alexandre" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 335 [ "$repo" = "slitaz-modular" ] && echo "contact = Christopher Rogers" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 336 [ "$repo" = "slitaz-pizza" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 337 [ "$repo" = "slitaz-tools" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@79 338 [ "$repo" = "slitaz-vz" ] && echo "contact = Eric Joseph-Alexandre" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@121 339 [ "$repo" = "ssfs" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 340 [ "$repo" = "tazlito" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@80 341 [ "$repo" = "tazpanel" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 342 [ "$repo" = "tazpkg" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 343 [ "$repo" = "tazusb" ] && echo "contact = Eric Joseph-Alexandre" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 344 [ "$repo" = "tazwok" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 345 [ "$repo" = "website" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 346 [ "$repo" = "wok" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 347 [ "$repo" = "wok-stable" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@110 348 [ "$repo" = "wok-tank" ] && echo "contact = Christopher Rogers" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 349 [ "$repo" = "wok-tiny" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 350 [ "$repo" = "wok-undigest" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 351 fi
slaxemulator@30 352
slaxemulator@32 353 if [ ! $(grep -l 'description = ' $REPOS_DIR/$repo/.hg/hgrc) ]; then
slaxemulator@97 354 [ "$repo" = "cookutils" ] && echo "description = Utils to cook SliTaz packages" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@112 355 [ "$repo" = "my-cookutils" ] && echo "description = More powerful version of cookutils" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 356 [ "$repo" = "flavors" ] && echo "description = SliTaz Cooking flavors" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 357 [ "$repo" = "flavors-stable" ] && echo "description = SliTaz Stable flavors" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 358 [ "$repo" = "slitaz-base-files" ] && echo "description = SliTaz base files" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 359 [ "$repo" = "slitaz-boot-scripts" ] && echo "description = SliTaz boot scripts" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 360 [ "$repo" = "slitaz-configs" ] && echo "description = SliTaz configuration files" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 361 [ "$repo" = "slitaz-dev-tools" ] && echo "description = SliTaz Developers Tools" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 362 [ "$repo" = "slitaz-doc" ] && echo "description = SliTaz system doc" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 363 [ "$repo" = "slitaz-doc-wiki-data" ] && echo "description = SliTaz documentation wiki content" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 364 [ "$repo" = "slitaz-forge" ] && echo "description = SliTaz Forge Config" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 365 [ "$repo" = "slitaz-modular" ] && echo "description = Scripts to make SliTaz Modular" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 366 [ "$repo" = "slitaz-pizza" ] && echo "description = SliTaz Online flavor builder" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 367 [ "$repo" = "slitaz-tools" ] && echo "description = SliTaz Tools and Tinyutils" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@79 368 [ "$repo" = "slitaz-vz" ] && echo "description = SliTaz OpenVZ integration" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@118 369 [ "$repo" = "ssfs" ] && echo "description = SliTaz Secure File Storage" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 370 [ "$repo" = "tazlito" ] && echo "description = SliTaz Live Tool" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@79 371 [ "$repo" = "tazpanel" ] && echo "description = Slitaz Administration Panel" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 372 [ "$repo" = "tazpkg" ] && echo "description = SliTaz Packages manager" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 373 [ "$repo" = "tazusb" ] && echo "description = SliTaz LiveUSB utility" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@79 374 [ "$repo" = "tazwok" ] && echo "description = SliTaz Packages builder" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 375 [ "$repo" = "website" ] && echo "description = SliTaz Website" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 376 [ "$repo" = "wok" ] && echo "description = SliTaz Cooking wok" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 377 [ "$repo" = "wok-stable" ] && echo "description = SliTaz Stable wok" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@110 378 [ "$repo" = "wok-tank" ] && echo "description = SliTaz Tank Mirror wok" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 379 [ "$repo" = "wok-tiny" ] && echo "description = Tiny SliTaz wok" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 380 [ "$repo" = "wok-undigest" ] && echo "description = SliTaz Undigest wok" >> $REPOS_DIR/$repo/.hg/hgrc
slaxemulator@32 381 fi
slaxemulator@32 382 done
slaxemulator@32 383 }
slaxemulator@30 384
slaxemulator@129 385 up_src_links() {
slaxemulator@129 386 local i
slaxemulator@129 387 if [ -d $SRCDIR ]; then
slaxemulator@129 388 [ -d $MAIN_WWW_DIR/slitaz/mirror/sources/packages ] && rm -rf $MAIN_WWW_DIR/slitaz/mirror/sources/packages
slaxemulator@129 389 for i in $(ls $SRCDIR); do
slaxemulator@129 390 [ -d $MAIN_WWW_DIR/slitaz/mirror/sources/packages/${i:0:1} ] || mkdir -p $MAIN_WWW_DIR/slitaz/mirror/sources/packages/${i:0:1}
slaxemulator@129 391 [ -f $MAIN_WWW_DIR/slitaz/mirror/sources/packages/${i:0:1}/$i ] || ln -sf $SRCDIR/$i $MAIN_WWW_DIR/slitaz/mirror/sources/packages/${i:0:1}/$i
slaxemulator@129 392 done
slaxemulator@129 393 fi
slaxemulator@129 394 }
slaxemulator@129 395
slaxemulator@32 396 case "$COMMAND" in
slaxemulator@89 397 start|on|tank-only|mirror-only)
slaxemulator@46 398 [ -d $MAIN_WWW_DIR/mirror-info ] && WWW="${WWW/mirror /}"
slaxemulator@32 399 for c in $WWW; do
slaxemulator@46 400 if [ ! -d $MAIN_WWW_DIR/$c ]; then
slaxemulator@32 401 www $c
slaxemulator@36 402 [ "$c" = "hg" ] && repos
slaxemulator@32 403 fi
slaxemulator@32 404 done
slaxemulator@89 405 echo "127.0.0.1 localhost $(cat /etc/hostname)" > /etc/hosts
slaxemulator@89 406 [ "$IP_ADDR" == "127.0.0.1" ] && echo "127.0.0.1 tazpanel tazpanel.slitaz.org" >> /etc/hosts
slaxemulator@32 407 for hostname in $ADDRESS; do
slaxemulator@89 408 if [ "$hostname" = "www.slitaz.org" ]; then
slaxemulator@93 409 echo "$IP_ADDR $hostname slitaz.org" >> /etc/hosts
slaxemulator@89 410 else
slaxemulator@42 411 echo "$IP_ADDR $hostname" >> /etc/hosts
slaxemulator@89 412 fi
slaxemulator@133 413 done
slaxemulator@133 414 if [ ! -L /usr/share/awstats/icon/other/slitaz-spider-48x48.png ]; then
slaxemulator@144 415 ln -s $REPOS_DIR/website/images/artwork/slitaz-spider-48x48.png /usr/share/awstats/icon/other/slitaz-spider-48x48.png
slaxemulator@133 416 fi
slaxemulator@42 417 if [ "$IP_ADDR" != "127.0.0.1" ]; then
slaxemulator@89 418 if [ ! $(grep -l "dhcp-option=option:router,$ROUTER_IP" /etc/dnsmasq.conf) ]; then
slaxemulator@89 419 echo "$IP_ADDR tazpanel tazpanel.slitaz.org" >> /etc/hosts
slaxemulator@42 420 echo "dhcp-option=option:router,$ROUTER_IP" >> /etc/dnsmasq.conf
slaxemulator@42 421 fi
slaxemulator@42 422 fi
slaxemulator@124 423 if [ -d "$SLITAZ_DIR/$version/packages" ]; then
slaxemulator@124 424 echo "$SLITAZ_DIR/$version/packages" > $LOCALSTATE/mirror
slaxemulator@124 425 fi
slaxemulator@36 426 if [ "$COMMAND" = "tank-only" ]; then
slaxemulator@36 427 [ -f $VHOST_TANK_FILE ] && ln -sf $VHOST_TANK_FILE /etc/lighttpd/vhosts.conf
slaxemulator@36 428 elif [ "$COMMAND" = "mirror-only" ]; then
slaxemulator@36 429 [ -f $VHOST_MIRROR_FILE ] && ln -sf $VHOST_MIRROR_FILE /etc/lighttpd/vhosts.conf
slaxemulator@36 430 else
slaxemulator@36 431 [ -f $VHOST_FILE ] && ln -sf $VHOST_FILE /etc/lighttpd/vhosts.conf
slaxemulator@36 432 fi
slaxemulator@79 433 chown -R www.www $SLITAZ_DIR/www
slaxemulator@129 434 up_src_links
slaxemulator@89 435 [ -x /etc/init.d/lighttpd ] && /etc/init.d/lighttpd start
slaxemulator@89 436 [ -x /etc/init.d/crond ] && /etc/init.d/crond start
slaxemulator@32 437 ;;
slaxemulator@46 438 update-repos)
slaxemulator@101 439 pwd=$(pwd)
slaxemulator@46 440 for i in $(ls $REPOS_DIR); do
slaxemulator@46 441 if [ -d $REPOS_DIR/$i/.hg ]; then
slaxemulator@46 442 cd $REPOS_DIR/$i
slaxemulator@46 443 echo "Updaing $i repo..."
slaxemulator@46 444 hg pull -u
slaxemulator@46 445 fi
slaxemulator@46 446 done
slaxemulator@101 447 cd $pwd
slaxemulator@46 448 ;;
slaxemulator@89 449 up-src-links)
slaxemulator@129 450 up_src_links
slaxemulator@89 451 ;;
slaxemulator@101 452 backup-mirror|-bm)
slaxemulator@101 453 case "$2" in
slaxemulator@101 454 pkgs-dry-push)
slaxemulator@101 455 rsync -avrtlz --delete --dry-run $PKGDIR ${sync_mirror} ;;
slaxemulator@101 456 src-dry-push)
slaxemulator@101 457 rsync -avrtlz --delete --dry-run $SRCDIR ${sync_mirror} ;;
slaxemulator@101 458 repos-dry-push)
slaxemulator@101 459 rsync -avrtlz --delete --dry-run $REPOS_DIR ${sync_mirror} ;;
slaxemulator@101 460 pkgs-push)
slaxemulator@101 461 rsync -avrtlz --delete $PKGDIR ${sync_mirror} ;;
slaxemulator@101 462 src-push)
slaxemulator@101 463 rsync -avrtlz --delete $SRCDIR ${sync_mirror} ;;
slaxemulator@101 464 repos-push)
slaxemulator@101 465 rsync -avrtlz --delete $REPOS_DIR ${sync_mirror} ;;
slaxemulator@101 466 pkgs-dry-pull)
slaxemulator@101 467 rsync -avrtlz --delete --dry-run ${sync_mirror}${PKGDIR} $(dirname ${PKGDIR}) ;;
slaxemulator@101 468 src-dry-pull)
slaxemulator@101 469 rsync -avrtlz --delete --dry-run ${sync_mirror}${SRCDIR} $(dirname ${SRCDIR}) ;;
slaxemulator@101 470 repos-dry-pull)
slaxemulator@101 471 rsync -avrtlz --delete --dry-run ${sync_mirror}${REPOS_DIR} $(dirname ${REPOS_DIR}) ;;
slaxemulator@101 472 pkgs-pull)
slaxemulator@101 473 rsync -avrtlz --delete ${sync_mirror}${PKGDIR} $(dirname ${PKGDIR}) ;;
slaxemulator@101 474 src-pull)
slaxemulator@101 475 rsync -avrtlz --delete ${sync_mirror}${SRCDIR} $(dirname ${SRCDIR}) ;;
slaxemulator@101 476 repos-pull)
slaxemulator@101 477 rsync -avrtlz --delete ${sync_mirror}${REPOS_DIR} $(dirname ${REPOS_DIR}) ;;
slaxemulator@101 478 *)
slaxemulator@101 479 echo "$0 backup-mirror pkgs-dry-{push|pull}"
slaxemulator@101 480 echo "$0 backup-mirorr pkgs-{push|pull}"
slaxemulator@101 481 echo "$0 backup-mirror src-dry-{push|pull}"
slaxemulator@101 482 echo "$0 backup-mirror src-{push|pull}"
slaxemulator@101 483 echo "$0 backup-mirror repos-dry-{push|pull}"
slaxemulator@101 484 echo "$0 backup-mirror repos-{push|pull}" ;;
slaxemulator@101 485 esac ;;
slaxemulator@129 486 off|stop)
slaxemulator@89 487 [ -x /etc/init.d/lighttpd ] && /etc/init.d/lighttpd stop
slaxemulator@89 488 [ -x /etc/init.d/crond ] && /etc/init.d/crond stop
slaxemulator@89 489 echo "127.0.0.1 localhost $(cat /etc/hostname) tazpanel" > /etc/hosts
slaxemulator@32 490 exit 1
slaxemulator@32 491 ;;
slaxemulator@32 492 *)
slaxemulator@32 493 usage
slaxemulator@32 494 ;;
slaxemulator@32 495 esac