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 #!/bin/bash
source /root/envsetup/global-conf.sh source /root/envsetup/global-conf.sh
# install cm if ( apt-cache madison campus-manager | grep "campus-manager | " ); then
apt-get install -y campus-manager # install cm
# configure nginx apt-get install -y campus-manager
sed -i "s@server_name skyreach;@server_name ${CM_SERVER_NAME};@" /etc/nginx/sites-available/skyreach.conf # configure nginx
service nginx restart 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): ...@@ -22,9 +22,9 @@ def setup(interactive=True):
utils.log('File "%s" updated.' % path) utils.log('File "%s" updated.' % path)
else: else:
utils.log('File "%s" already up to date.' % path) utils.log('File "%s" already up to date.' % path)
cmds = [
'service apt-cacher-ng restart',
]
utils.run_commands(cmds)
else: else:
utils.log('The configuration file "%s" does not exist, nothing to do.' % path) 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 @@ ...@@ -7,9 +7,12 @@
# -- Constants -- # -- Constants --
CYAN='\033[0;36m' CYAN='\033[0;36m'
PURPLE='\033[0;35m'
BLUE='\033[0;34m'
YELLOW='\033[0;32m'
GREEN='\033[0;32m' GREEN='\033[0;32m'
RED='\033[0;31m' RED='\033[0;31m'
NC='\033[0m' NC='\033[0;0m'
# -- System -- # -- System --
# Skyreach in which system looks for packages # 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