> Have you seen > http://www.sun.com/bigadmin/features/articles/smf_exam > ple.jsp? > > It gives a good overview of how to add a service. > > SMF is the best way to go on (Open)Solaris.h >
I tried to simple launch a Perl script which uses a Daemon, but I get all the time the following error message: "Stopping because all processes in service exited." The script works as follow: #!/sbin/sh # Start/stop client SAS MetaData service # . /lib/svc/share/smf_include.sh DIR=/var/www/trashmail/sbin PID=/var/run/cnt_lines.pid SRVR=cnt_lines CFG=$DIR/"$SRVR".pl case "$1" in 'start') $CFG ;; 'restart') cat $PID | xargs -n 1 kill -9 ;; 'stop') cat $PID | xargs -n 1 kill -9 ;; *) echo "Usage: $0 { start | stop | restart }" exit 1 ;; esac exit $SMF_EXIT_OK By the way: If SMF knows how to kill my process, why does I need to define stop and restart? My perl script uses the following code: use Proc::Daemon; # module for daemon mode # Go to daemon mode Proc::Daemon::Init; I suppose that SMF is monitoring the wrong PID. Is there a possibility that I can force SMF to monitor another PID? Because I write it to /var/run/cnt_lines.pid -- This message posted from opensolaris.org _______________________________________________ opensolaris-help mailing list opensolaris-help@opensolaris.org