License info added.

Change-Id: Ia457bedd8bbd11f24a6e2edadaddb82a82116c20
This commit is contained in:
Igor Yozhikov 2013-05-21 16:26:05 +04:00
parent 8c937e2d63
commit c0e7a78308

View File

@ -1,6 +1,19 @@
#!/bin/sh #!/bin/sh
# Install script for murano-conductor daemon # Copyright (c) 2013 Mirantis, Inc.
# writen by Igor Yozhikov, provides as-is. #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Ubuntu script.
LOGLVL=1 LOGLVL=1
SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd` SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
PREREQ_PKGS="wget git python-pip python-dev python-mysqldb" PREREQ_PKGS="wget git python-pip python-dev python-mysqldb"
@ -32,9 +45,9 @@ in_sys_pkg()
log "Package \"$PKG\" already installed" log "Package \"$PKG\" already installed"
else else
log "Installing \"$PKG\"..." log "Installing \"$PKG\"..."
apt-get install $PKG --yes > /dev/null 2>&1 apt-get install $PKG --yes > /dev/null 2>&1
if [ $? -ne 0 ];then if [ $? -ne 0 ];then
log "installation fails, exiting!!!" log "installation fails, exiting!!!"
exit exit
fi fi
fi fi
@ -48,9 +61,9 @@ gitclone()
log "Cloning from \"$FROM\" repo to \"$CLONEROOT\"" log "Cloning from \"$FROM\" repo to \"$CLONEROOT\""
cd $CLONEROOT && git clone $FROM > /dev/null 2>&1 cd $CLONEROOT && git clone $FROM > /dev/null 2>&1
if [ $? -ne 0 ];then if [ $? -ne 0 ];then
log "cloning from \"$FROM\" fails, exiting!!!" log "cloning from \"$FROM\" fails, exiting!!!"
exit exit
fi fi
} }
@ -159,11 +172,11 @@ case $COMMAND in
if [ ! -x $SERVICE_EXEC_PATH ];then if [ ! -x $SERVICE_EXEC_PATH ];then
log "Can't find \"conductor\" in at \"$SERVICE_EXEC_PATH\", please install the \"$SERVICE_SRV_NAME\" or set variable SERVICE_EXEC_PATH=/path/to/daemon before running setup script, exiting!!!" log "Can't find \"conductor\" in at \"$SERVICE_EXEC_PATH\", please install the \"$SERVICE_SRV_NAME\" or set variable SERVICE_EXEC_PATH=/path/to/daemon before running setup script, exiting!!!"
exit exit
fi fi
ln -s /lib/init/upstart-job /etc/init.d/$SERVICE_SRV_NAME ln -s /lib/init/upstart-job /etc/init.d/$SERVICE_SRV_NAME
log "Injecting \"$SERVICE_SRV_NAME\" to init..." log "Injecting \"$SERVICE_SRV_NAME\" to init..."
injectinit injectinit
postinst postinst
;; ;;
install ) install )