From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 14 May 2005 10:54:37 +0400 From: Anton Gorlov X-Mailer: The Bat! (v3.0.1.33) Professional X-Priority: 3 (Normal) Message-ID: <08307560.20050514105437@mail.ru> To: community@altlinux.ru MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1251 Content-Transfer-Encoding: quoted-printable Subject: [Comm] init.d X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2005 06:56:55 -0000 Archived-At: List-Archive: List-Post: =C7=E4=F0=E0=E2=F1=F2=E2=F3=E9=F2=E5, community. =D7=F2=EE =F1=EA=E0=E6=F3=F2 =C3=D3=D0=D3 =EF=EE =EF=EE=E2=EE=E4=F3 =EF=F0= =E8=E2=E5=E4=B8=ED=ED=EE=E3=EE =ED=E8=E6=E5 =F1=EA=F0=E8=EF=F2=E0? =C2 =F7= =E0=F1=F2=ED=EE=F1=F2=E8=E8 =E8=ED=F2=E5=F0=E8=F1=F3=E5=F2 -=EF=F0=E8=E4=B8=F2=F1=FF =EB=E8 =E5=E3=EE = =EF=E5=F0=E5=EF=E8=EB=E8=E2=E0=F2=FC =EF=EE=E4 ALT =E8=EB=E8 =EE=ED =E8 =F2= =E0=EA =E2=E7=EB=E5=F2=E8=F2? #!/bin/sh # Startup script for IBS # # chkconfig: 2345 95 05 # description: Run/Shutdown Isp Billing System # Source function library. . /etc/rc.d/init.d/functions prog=3D"ibs.py" ibs_check=3D"ibs_check.py" ibs_root=3D"/usr/local/ibs" export LD_ASSUME_KERNEL=3D2.4.1 #prevent python deadlocks startibs_check() { echo "Starting IBS Checker process:" daemon $ibs_root/sc/$ibs_check RETVAL=3D$? echo return $RETVAL } startibs() { echo -n $"Starting IBS Core: "=20 /sbin/modprobe sch_tbf >/dev/null 2>&1 daemon -1 $ibs_root/$prog echo return $RETVAL } stop() { echo -n $"Stopping $prog: " /usr/bin/killall $prog RETVAL=3D$? c=3D0 while [ \( "`ps x|grep ibs.py|grep -v grep`" !=3D "" \) -a \( $c -lt 20= \) ]; do sleep 1 echo -n "." c=3D$((c+1)) done /usr/bin/killall -9 ibs.py >/dev/null 2>&1 /usr/bin/killall ibs_check.py if [ $RETVAL =3D 0 ]; then success else failure fi echo=20 return $RETVAL } case "$1" in start) startibs startibs_check ;; =20 stop) stop ;; =20 status) status $prog ;; restart) stop sleep 1 startibs startibs_check ;; =20 startibs) startibs ;; *) echo $"Usage: $0 {start|startibs|stop|restart|status}" exit 1 esac exit 0 --=20 =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC, Anton mailto:Pnz.Stalker@mail.ru FIDO: 2:5059/37