What if the server automatically starts on startup with the init.d script provided in the wiki ?
How can I stop it ?
This is the beginning of the script :
# Diaspora
#
# chkconfig: 345 91 10
# description: Starts and stops the Diaspora daemon.
#
PROC_NAME=Diaspora
DIASPORA_HOME=/var/www/diaspora
# Change the user to whichever user you need
RUN_AS_USER=diaspora
startup="cd $DIASPORA_HOME; ./script/server"
# Replace by stop/shutdown command
shutdown="$DIASPORA_HOME/script/server"
start(){
echo -n $"Starting $PROC_NAME service: "
su -l $RUN_AS_USER -c "$startup"
RETVAL=$?
echo
}
stop(){
echo -n $"Stoping $PROC_NAME service: "
# Uncomment here to allow stop
su -l $RUN_AS_USER -c "$shutdown"
RETVAL=$?
echo
}
restart(){
stop
start
}
(...)
-------------------------------------------------
Obviously this is not the right command : shutdown="$DIASPORA_HOME/script/server"
Could someone give me a hint ? ;)
I'm trying to get the less barbaric command to shutdown server on demand for using the service diaspora stop/restart command.
Best regards !