ubuntu – How to allow Diaspora to start when server boot up – Stack Overflow

# This is the init script for starting up the# Diaspora## chkconfig: 345 91 10# description: Starts and stops the Diaspora daemon.#PROC_NAME=DiasporaDIASPORA_HOME=/home/diaspora# Change the user to whichever user you needRUN_AS_USER=diasporastartup=”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″ instart) start ;;stop) stop ;;restart) restart ;;*) echo $”Usage: $0 {start|stop|restart}” exit 1esacexit 0

Source: ubuntu – How to allow Diaspora to start when server boot up – Stack Overflow

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.