[LUGOS] bash skripta

Antencek antencek at volja.net
Tue May 10 15:04:27 CEST 2005


Živjo.

Če v restart delu $0 zamenjas z: sh ime_skripte.sh, potem pa deluje.

LP

Tomaz Kravcar wrote:

> Pozdravljeni,
>
> zanima me kaj moram narediti da mi bo delal ukaz restart pri
> sledeci bash skripti. Trenutno prekine izvajanje skripte po
> ukazu "$0 stop || true".
>
> case "$1" in
>  start)
>     cd /dl/mldonkey
>     rm /dl/mldonkey/*.tmp 2> /dev/null || true
>     rm -rf servers.ini* 2> /dev/null || true
>     echo "Starting mlnet server"
>     su mlnet -s /bin/bash -c "./mlnet -daemon &> /dev/null"
>     ;;
>  stop)
>     killall -9 mlnet
>     ;;
>  restart)
>     $0 stop || true
>     sleep 3
>     $0 start
>     ;;
>  *)
> esac


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://liste2.lugos.si/pipermail/lugos-list/attachments/20050510/e508c635/attachment.htm


More information about the lugos-list mailing list