Revision history [back]

swift service autostart fail

Hi,

We used ubuntu 10.04 and swift 1.4.9, and we install swift by "python setup.py install". We also write autostart script, and use chkconfig tool to set autostart(by "chkconfig -add swift-service"). But we failed to get swift autostart after reboot. But we can run command "swift-init main start" to get swift service start after reboot.

What is the problem caused autostart failed? Please help! Thank you in advance!

Here is my autostart script(named "swift-service").

! /bin/sh

BEGIN INIT INFO

Provides: swift-service

Required-Start: $remote_fs

Required-Stop: $remote_fs

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: swift-service

Description: service of the package swift-service

END INIT INFO

SERVICE_NAME="swift-service" PRINT_NAME="swift-service"

. /lib/lsb/init-functions

cd /

case "$1" in start) echo "Starting ${PRINT_NAME}" swift-init all start ;; stop) echo "Stopping ${PRINT_NAME}" swift-init all stop ;; restart|force-reload|reload) echo "Restarting ${PRINT_NAME}" swift-init all restart ;; status) echo "Status ${PRINT_NAME}" swift-init all status ;; *) echo "Usage: $0 {start|stop|restart|reload}" exit 1 ;; esac

exit 0