Pages: [1]   Go Down
Author Topic: Startupscripts for Linux  (Read 225 times)
0 Members and 1 Guest are viewing this topic.
Dassing
Newbie
*

Karma: 0
Offline Offline

Posts: 9


View Profile
« on: January 10, 2007, 08:29:21 AM »

<Hello>> $PANDORA_PATH/pandora.log &  
#        MYPID=$!
#        echo $MYPID > $PIDFILE
        su - pandora "$PANDORA_PATH/$DAEMON $PANDORA_PATH >> $PANDORA_PATH/pandora.log &"  
   sleep 1
   MYPID=`ps auxw | grep $PANDORA_PATH/$DAEMON | grep -v "grep" | head -1 | awk '{ print $2;}'`
   echo $MYPID > $PIDFILE
   echo "Pandora Agent is now running with PID $MYPID"
        ;;


I used "su" to start the agent under account pandora but made sure that
the pid files are stored as root.
Similiar setups were done for the other startup scripts.

Maybe, this post is of any help for you.

Regards,

R.D.
« Last Edit: January 01, 1970, 01:00:00 AM by Dassing » Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST