まず、init スクリプトを作成する必要があります。
# 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
次に、ファイルを実行可能にします。
sudo chmod +x /etc/init.d/diaspora
次に、通常はデフォルトの実行レベルを使用して、Ubuntu に開始/停止を指示する必要があります (前のスクリプトを /etc/init.d/diaspora に保存したと仮定します)。
sudo update-rc.d diaspora defaults
それから試してみてください:
sudo service diaspora start
また
sudo /etc/init.d/diaspora start
ディアスポラが始まれば準備完了です。そうしないと、スクリプトの調整が必要になる場合があります。