Permalink
Browse files

Upgrade Adagios to 1.6.3-2

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jan 13, 2019
1 parent 9f7c252 commit 36551782dcd082613fb77668ec37298db12b337e
Showing with 19 additions and 9 deletions.
  1. +19 −9 build/180-adagios
@@ -11,6 +11,15 @@ Defaults:%nagios !requiretty
' | sudo EDITOR='tee -a' visudo
fi

if ! grep -q "# Adagios 1.5" /etc/sudoers; then
echo '
# Adagios 1.5
Defaults:www-data !requiretty
www-data ALL = (root) NOPASSWD: /usr/sbin/service nagios *
www-data ALL = (root) NOPASSWD: /usr/local/nagios/bin/nagios -v *
' | sudo EDITOR='tee -a' visudo
fi

# Install dependencies
apt install -y libapache2-mod-wsgi python-simplejson libgmp-dev python-dev python-paramiko

@@ -28,25 +37,26 @@ python setup.py install

# Install Adagios
cd /tmp/
#git clone --branch adagios-1.6.3-2 https://github.com/opinkerfi/adagios
#cd adagios
wget -O adagios.tar.gz https://github.com/opinkerfi/adagios/archive/adagios-1.6.3-1.tar.gz
wget -O adagios.tar.gz https://github.com/opinkerfi/adagios/archive/adagios-1.6.3-2.tar.gz
tar xzf adagios.tar.gz
cd adagios-adagios-1.6.3-1
cd adagios-adagios-1.6.3-2
if [[ -d /etc/adagios ]]; then
rm -rf /etc/adagios
fi
cp -R adagios/etc/adagios /etc/
cp -f /root/nems/nems-migrator/data/1.4/adagios/adagios.conf /etc/adagios/
cp -f /root/nems/nems-migrator/data/1.5/adagios/adagios.conf /etc/adagios/
python setup.py install
ln -s /usr/local/lib/python2.7/dist-packages/adagios /var/www/adagios
chown -R nagios:nagios /etc/adagios
rm -fr /var/www/adagios/etc/
mkdir -p /var/lib/adagios/userdata
chown -R www-data:www-data /var/lib/adagios
cp -f /root/nems/nems-migrator/data/1.4/adagios/settings.py /var/www/adagios/
cp -f /root/nems/nems-migrator/data/1.5/adagios/settings.py /var/www/adagios/
chown -R www-data:www-data /var/www/adagios/

# Import templates
cp -f /root/nems/nems-migrator/data/1.4/adagios/templates/403.html /var/www/adagios/templates/
cp -f /root/nems/nems-migrator/data/1.4/adagios/templates/base.html /var/www/adagios/templates/
cp -f /root/nems/nems-migrator/data/1.5/adagios/templates/403.html /var/www/adagios/templates/
cp -f /root/nems/nems-migrator/data/1.5/adagios/templates/base.html /var/www/adagios/templates/


cat << EOF > /etc/apache2/conf-available/adagios.conf
@@ -73,7 +83,7 @@ a2enconf adagios
cd /opt
git clone https://github.com/opinkerfi/okconfig.git
echo 'export PYTHONPATH=$PYTHONPATH:/opt/okconfig' > /etc/profile.d/okconfig.sh
cp -f /root/nems/nems-migrator/data/1.4/adagios/okconfig.conf /etc/okconfig.conf
cp -f /root/nems/nems-migrator/data/1.5/adagios/okconfig.conf /etc/okconfig.conf
source /etc/profile
ln -s /opt/okconfig/usr/share/okconfig /usr/share/
ln -s /opt/okconfig/usr/bin/okconfig /usr/local/bin/

0 comments on commit 3655178

Please sign in to comment.