Skip to content
Snippets Groups Projects
Commit 107a0b64 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Changed CM setup to skip install if package is not available (refs #21802).

parent 67197286
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
source /root/envsetup/global-conf.sh
# install cm
apt-get install -y campus-manager
# configure nginx
sed -i "s@server_name skyreach;@server_name ${CM_SERVER_NAME};@" /etc/nginx/sites-available/skyreach.conf
service nginx restart
if ( apt-cache madison campus-manager | grep "campus-manager | " ); then
# install cm
apt-get install -y campus-manager
# configure nginx
sed -i "s@server_name skyreach;@server_name ${CM_SERVER_NAME};@" /etc/nginx/sites-available/skyreach.conf
service nginx restart
else
echo "${YELLOW}The campus-manager package is not available in APT repositories, install skipped.${NC}"
fi
......@@ -22,9 +22,9 @@ def setup(interactive=True):
utils.log('File "%s" updated.' % path)
else:
utils.log('File "%s" already up to date.' % path)
cmds = [
'service apt-cacher-ng restart',
]
utils.run_commands(cmds)
else:
utils.log('The configuration file "%s" does not exist, nothing to do.' % path)
cmds = [
'service apt-cacher-ng restart',
]
utils.run_commands(cmds)
......@@ -7,9 +7,12 @@
# -- Constants --
CYAN='\033[0;36m'
PURPLE='\033[0;35m'
BLUE='\033[0;34m'
YELLOW='\033[0;32m'
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
NC='\033[0;0m'
# -- System --
# Skyreach in which system looks for packages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment