From: Anton Gorlov <Pnz.Stalker@mail.ru> To: community@altlinux.ru Subject: [Comm] init.d Date: Sat, 14 May 2005 10:54:37 +0400 Message-ID: <08307560.20050514105437@mail.ru> (raw) Здравствуйте, community. Что скажут ГУРУ по поводу приведённого ниже скрипта? В частностии интерисует -придётся ли его перепиливать под ALT или он и так взлетит? #!/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="ibs.py" ibs_check="ibs_check.py" ibs_root="/usr/local/ibs" export LD_ASSUME_KERNEL=2.4.1 #prevent python deadlocks startibs_check() { echo "Starting IBS Checker process:" daemon $ibs_root/sc/$ibs_check RETVAL=$? echo return $RETVAL } startibs() { echo -n $"Starting IBS Core: " /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=$? c=0 while [ \( "`ps x|grep ibs.py|grep -v grep`" != "" \) -a \( $c -lt 20 \) ]; do sleep 1 echo -n "." c=$((c+1)) done /usr/bin/killall -9 ibs.py >/dev/null 2>&1 /usr/bin/killall ibs_check.py if [ $RETVAL = 0 ]; then success else failure fi echo return $RETVAL } case "$1" in start) startibs startibs_check ;; stop) stop ;; status) status $prog ;; restart) stop sleep 1 startibs startibs_check ;; startibs) startibs ;; *) echo $"Usage: $0 {start|startibs|stop|restart|status}" exit 1 esac exit 0 -- С уважением, Anton mailto:Pnz.Stalker@mail.ru FIDO: 2:5059/37
next reply other threads:[~2005-05-14 6:54 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-05-14 6:54 Anton Gorlov [this message] 2005-05-14 7:08 ` [Comm] init.d Michael Shigorin 2005-05-14 7:09 ` Anton Gorlov 2005-05-14 15:53 ` Michael Shigorin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=08307560.20050514105437@mail.ru \ --to=pnz.stalker@mail.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git