First you need to create an init script:
# This is the init script for starting up the # Diaspora # # chkconfig: 345 91 10 # description: Starts and stops the Diaspora daemon. # PROC_NAME=Diaspora DIASPORA_HOME=/home/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 } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit 0
Then make an executable file:
sudo chmod +x /etc/init.d/diaspora
Then you need to tell Ubuntu to start / stop, usually using the default runlevels (assuming you saved the previous script in /etc/init.d/diaspora):
sudo update-rc.d diaspora defaults
Then try:
sudo service diaspora start
or
sudo /etc/init.d/diaspora start
If the diaspora begins, then you are good to go. Otherwise, the script may need to be adjusted.
source share