Ask Your Question
0

swift service autostart fail

asked 2012-10-29 01:46:51 -0600

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

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2012-10-29 06:15:29 -0600

It is problem of the environment variable.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-10-29 01:46:51 -0600

Seen: 49 times

Last updated: Oct 29 '12