Hi ,
I need to create a daemon to monitor traffic, and I am using similar
method as uuidd.rc to create a daemon. However, I can't the way(code)
that the Uuidd.rc can be started? neithor from init.rc or system
("Uuidd.rc").
can someone let me know how the daemon or (.rc) can be executed?
Thanks,
david
=================== Uuidd.rc ===========================
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/uuidd
PIDFILE=/var/run/uuidd/uuidd.pid
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting uuid generator" "uuidd"
start_daemon -p $PIDFILE $DAEMON
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping uuidd generator" "uuidd"
killproc -p $PIDFILE $DAEMON
log_end_msg $?
;;
status)
if pidofproc -p $PIDFILE $DAEMON >& /dev/null ; then
echo "$DAEMON is running";
exit 0;
else
echo "$DAEMON is NOT running";
if test -f /var/run/uuidd.pid; then exit 2; fi
exit 3;
fi
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/uuidd {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---