Dzięki za odpowiedź.
Zrobiłem trochę inaczej, ale też działa.
Mianowicie:
Skrypt jest taki:
#!/bin/sh
# Install Squid Proxy
err() {
echo $*; exit 1
}
[ "$2" = "0.2.7" ] || err "Sorry, this package is for v0.2.7, installation aborted."
[ "$3" = fd0 -o "$4" -lt 100000
tu zmieniłem na 0 -o "$5" -lt 10
i tu też na 0 ] && err "Sorry, not enough free {ram}disk space to install."
if [ -d /mnt/router/packages/squid ]; then
echo "Hmm, I think, you have Squid already,"
read -p "Are you sure you want to reinstall over the top of it [y/n] ? " tmp
[ "$tmp" = y ] || err "Cancelled."
fi
cd /mnt
snarf -n $1/squid.tgz
a tu wpisałem: http://download.freesco.pl/packages027/squid.tgz || err "An occured while downloading. Installation aborted."
cd /
zcat </mnt/squid.tgz | star || err "squid.tgz seems to be corrupt, try downloading again."
rm /mnt/squid.tgz
rc__ restart
chown -R nobody /mnt/router/packages/squid/cache
chown -R nobody /mnt/router/packages/squid/logs
ln /mnt/router/packages/squid/bin/cachemgr.cgi /www/cgi-bin/cachemgr.cgi
/mnt/router/packages/squid/bin/squid -z
edit /mnt/router/packages/squid/etc/squid.conf
echo "Ok, now you have Squid-2.3STABLE2 on your FreeSco! Try 'rc_squid' to"
echo "start. Don't forget edit /mnt/router/packages/squid/etc/squid.conf for"
echo "your needs. This is my first Squid package release. Don't ask me about"
echo "Squid 2.4 - it not work with Freesco."
echo "Enjoy!"
echo ""
echo " wapr."
Co wygląda teraz tak:
#!/bin/sh
# Install Squid Proxy
err() {
echo $*; exit 1
}
[ "$2" = "0.2.7" ] || err "Sorry, this package is for v0.2.7, installation aborted."
[ "$3" = fd0 -o "$4" -lt 0 -o "$5" -lt 0 ] && err "Sorry, not enough free {ram}disk space to install."
if [ -d /mnt/router/packages/squid ]; then
echo "Hmm, I think, you have Squid already,"
read -p "Are you sure you want to reinstall over the top of it [y/n] ? " tmp
[ "$tmp" = y ] || err "Cancelled."
fi
cd /mnt
snarf -n
http://download.freesco.pl/packages027/squid.tgz || err "An occured while downloading. Installation aborted."
cd /
zcat </mnt/squid.tgz | star || err "squid.tgz seems to be corrupt, try downloading again."
rm /mnt/squid.tgz
rc__ restart
chown -R nobody /mnt/router/packages/squid/cache
chown -R nobody /mnt/router/packages/squid/logs
ln /mnt/router/packages/squid/bin/cachemgr.cgi /www/cgi-bin/cachemgr.cgi
/mnt/router/packages/squid/bin/squid -z
edit /mnt/router/packages/squid/etc/squid.conf
echo "Ok, now you have Squid-2.3STABLE2 on your FreeSco! Try 'rc_squid' to"
echo "start. Don't forget edit /mnt/router/packages/squid/etc/squid.conf for"
echo "your needs. This is my first Squid package release. Don't ask me about"
echo "Squid 2.4 - it not work with Freesco."
echo "Enjoy!"
echo ""
echo " wapr."
Chciałbym jeszcze wiedzieć czym to bylo spowodowane?