mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 02:53:18 +01:00
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack.git
This commit is contained in:
commit
3f18f182b8
@ -5,9 +5,9 @@
|
|||||||
# Required-Stop: $local_fs
|
# Required-Stop: $local_fs
|
||||||
# Should-Start:
|
# Should-Start:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start:
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: Start up the cloud.com service
|
# Short-Description: Start up the CloudStack cloud service
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# or more contributor license agreements. See the NOTICE file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
@ -74,7 +74,7 @@ _failure() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
CLOUD_COM_HOME="/usr/local/cloud"
|
CLOUDSTACK_HOME="/usr/local/cloud"
|
||||||
|
|
||||||
# mkdir -p /var/log/vmops
|
# mkdir -p /var/log/vmops
|
||||||
|
|
||||||
@ -82,23 +82,23 @@ get_pids() {
|
|||||||
local i
|
local i
|
||||||
for i in $(ps -ef| grep java | grep -v grep | awk '{print $2}');
|
for i in $(ps -ef| grep java | grep -v grep | awk '{print $2}');
|
||||||
do
|
do
|
||||||
echo $(pwdx $i) | grep "$CLOUD_COM_HOME" | awk -F: '{print $1}';
|
echo $(pwdx $i) | grep "$CLOUDSTACK_HOME" | awk -F: '{print $1}';
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
local pid=$(get_pids)
|
local pid=$(get_pids)
|
||||||
if [ "$pid" != "" ]; then
|
if [ "$pid" != "" ]; then
|
||||||
echo "cloud.com sevice is already running, PID = $pid"
|
echo "CloudStack cloud sevice is already running, PID = $pid"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Starting cloud.com service (type=$TYPE) "
|
echo -n "Starting CloudStack cloud service (type=$TYPE) "
|
||||||
if [ -f $CLOUD_COM_HOME/systemvm/run.sh ];
|
if [ -f $CLOUDSTACK_HOME/systemvm/run.sh ];
|
||||||
then
|
then
|
||||||
if [ "$pid" == "" ]
|
if [ "$pid" == "" ]
|
||||||
then
|
then
|
||||||
(cd $CLOUD_COM_HOME/systemvm; nohup ./run.sh > /var/log/cloud/cloud.out 2>&1 & )
|
(cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh > /var/log/cloud/cloud.out 2>&1 & )
|
||||||
pid=$(get_pids)
|
pid=$(get_pids)
|
||||||
echo $pid > /var/run/cloud.pid
|
echo $pid > /var/run/cloud.pid
|
||||||
fi
|
fi
|
||||||
@ -107,29 +107,29 @@ start() {
|
|||||||
_failure
|
_failure
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo 'start' > $CLOUD_COM_HOME/systemvm/user_request
|
echo 'start' > $CLOUDSTACK_HOME/systemvm/user_request
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
local pid
|
local pid
|
||||||
echo -n "Stopping cloud.com service (type=$TYPE): "
|
echo -n "Stopping CloudStack cloud service (type=$TYPE): "
|
||||||
for pid in $(get_pids)
|
for pid in $(get_pids)
|
||||||
do
|
do
|
||||||
kill $pid
|
kill $pid
|
||||||
done
|
done
|
||||||
_success
|
_success
|
||||||
echo
|
echo
|
||||||
echo 'stop' > $CLOUD_COM_HOME/systemvm/user_request
|
echo 'stop' > $CLOUDSTACK_HOME/systemvm/user_request
|
||||||
}
|
}
|
||||||
|
|
||||||
status() {
|
status() {
|
||||||
local pids=$(get_pids)
|
local pids=$(get_pids)
|
||||||
if [ "$pids" == "" ]
|
if [ "$pids" == "" ]
|
||||||
then
|
then
|
||||||
echo "cloud.com service is not running"
|
echo "CloudStack cloud service is not running"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "cloud.com service (type=$TYPE) is running: process id: $pids"
|
echo "CloudStack cloud service (type=$TYPE) is running: process id: $pids"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,6 @@ class Services:
|
|||||||
"cpunumber": 1,
|
"cpunumber": 1,
|
||||||
"cpuspeed": 100,
|
"cpuspeed": 100,
|
||||||
"memory": 128,
|
"memory": 128,
|
||||||
"storagetype": "local"
|
|
||||||
},
|
},
|
||||||
"egress": {
|
"egress": {
|
||||||
"name": 'web',
|
"name": 'web',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user