代码拉取完成,页面将自动刷新
#!/bin/sh
# the following is chkconfig init header
#
# zstack-appliancevm: zstack appliance vm agent daemon
#
# chkconfig: 345 97 03
# description: This is a daemon instructed by zstack management server \
# to perform appliance vm related operations\
# See http://zstack.org
#
# processname: appliancevm
# pidfile: /var/run/zstack/appliancevm.pid
#
check_status() {
pidfile='/var/run/zstack/appliancevm.pid'
if [ ! -f $pidfile ]; then
echo "zstack appliance vm agent is stopped"
exit 1
else
pid=`cat $pidfile`
ps -p $pid > /dev/null
if [ $? -eq 0 ]; then
echo "zstack appliance vm agent is running, pid is $pid"
exit 0
else
echo "zstack appliance vm is stopped, but pidfile at $pidfile is not cleaned. It may be caused by the agent crashed at last time, manually cleaning it would be ok"
exit 1
fi
fi
}
if [ $# -eq 0 ]; then
echo "usage: $0
[start|stop|restart|status]"
exit 1
fi
if [ "$@" = "status" ]; then
check_status
else
. /var/lib/zstack/virtualenv/appliancevm/bin/activate && python -c "from appliancevm import daemon; daemon.main()" $@
fi
if [ $? -eq 0 ]; then
echo "$@ zstack appliance vm agent .... SUCCESS"
exit 0
else
echo "$@ zstack appliacen vm agent .... FAILED"
exit 1
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。