Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
IBS ISP Billing Sftware
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
redface
n00b
n00b


Joined: 21 Dec 2004
Posts: 1

PostPosted: Tue Dec 21, 2004 3:30 am    Post subject: IBS ISP Billing Sftware Reply with quote

Hi All,

Is there anyone already installed IBS ISP Billing Software in Gentoo? http://ibs.sourceforge.net/ I already installed it but i cant make the init script work. may be someone can help me with this?

the script is for Redhat/Fedora Distro..
Can somebody help me convert this in gentoo startup script?

#!/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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum