CC-2592: Full install issues running twice in a row
- use "rm -rf" instead of "rm" when deleting /etc/apache2/sites-enabled/000-default - append "include /etc/monit/conf.d/*" to /etc/monit/monitrc if it's first time installing it. - bypass python lib installation and patching if virtualenv already exists
This commit is contained in:
parent
d94357e5e5
commit
86ca2c7fc4
2 changed files with 23 additions and 16 deletions
|
@ -11,24 +11,24 @@ VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv"
|
|||
if [ ! -d "$VIRTUAL_ENV_DIR" ]; then
|
||||
echo -e "\n*** Creating Vitualenv for Airtime ***"
|
||||
sudo virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
|
||||
|
||||
echo -e "\n*** Installing Python Libraries ***"
|
||||
sudo /usr/lib/airtime/airtime_virtualenv/bin/pip install ${SCRIPTPATH}/airtime_virtual_env.pybundle -E /usr/lib/airtime/airtime_virtualenv
|
||||
|
||||
echo -e "\n*** Patching Python Libraries ***"
|
||||
PACHES=${SCRIPTPATH}/patches/*
|
||||
for file in $(find $PACHES -print); do
|
||||
if [ -d $file ]; then
|
||||
DIRNAME=$(basename $file)
|
||||
echo -e "\n ---Applying Patches for $DIRNAME---"
|
||||
else
|
||||
sudo patch -N -p0 -i $file
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo -e "\n*** Existing Airtime Virturalenv Found ***"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "\n*** Installing Python Libraries ***"
|
||||
sudo /usr/lib/airtime/airtime_virtualenv/bin/pip install ${SCRIPTPATH}/airtime_virtual_env.pybundle -E /usr/lib/airtime/airtime_virtualenv
|
||||
|
||||
echo -e "\n*** Patching Python Libraries ***"
|
||||
PACHES=${SCRIPTPATH}/patches/*
|
||||
for file in $(find $PACHES -print); do
|
||||
if [ -d $file ]; then
|
||||
DIRNAME=$(basename $file)
|
||||
echo -e "\n ---Applying Patches for $DIRNAME---"
|
||||
else
|
||||
sudo patch -N -p0 -i $file
|
||||
fi
|
||||
done
|
||||
cd
|
||||
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
||||
. ${virtualenv_bin}activate
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue