let's just do it with one file
This commit is contained in:
parent
d714be293e
commit
9489055dd2
2 changed files with 22 additions and 42 deletions
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash -f
|
||||
#
|
||||
# installCAVE-el7.sh
|
||||
#
|
||||
# Download awips2.repo from the Unidata web server
|
||||
#
|
||||
if [ ! -f /etc/yum.repos.d/awips2.repo ]; then
|
||||
echo ''
|
||||
echo 'Downloading awips2repo yum file to /etc/yum.repos.d/awips2.repo'
|
||||
echo ''
|
||||
wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/el7.repo
|
||||
fi
|
||||
|
||||
echo "Running 'yum clean all'"
|
||||
yum clean all
|
||||
echo ''
|
||||
|
||||
echo ''
|
||||
echo "Running 'yum groupinstall awips2-cave'"
|
||||
echo ''
|
||||
yum groupinstall awips2-cave -y 2>&1 | tee -a /tmp/cave-install.log
|
||||
|
||||
if getent passwd awips &>/dev/null; then
|
||||
echo ''
|
||||
echo "Setting permissions to user awips:awips"
|
||||
/bin/chown -R awips:awips /awips2/cave /awips2/alertviz
|
||||
else
|
||||
echo ''
|
||||
echo "--- user awips does not exist"
|
||||
echo "--- you should set owner/group permissions for /awips2/cave and /awips2/alertviz:"
|
||||
echo "tried to run 'chown -R awips:awips /awips2/cave /awips2/alertviz'"
|
||||
fi
|
||||
echo ""
|
||||
echo "Done."
|
|
@ -50,15 +50,29 @@ echo "Running 'yum groupinstall awips2-cave'"
|
|||
echo ''
|
||||
yum groupinstall awips2-cave -y 2>&1 | tee -a /tmp/cave-install.log
|
||||
|
||||
if getent passwd awips &>/dev/null; then
|
||||
if [[ $(grep "release 7" /etc/redhat-release) ]]; then
|
||||
if getent passwd awips &>/dev/null; then
|
||||
echo ''
|
||||
echo "Setting permissions to user awips:awips"
|
||||
/bin/chown -R awips:awips /awips2/cave /awips2/alertviz
|
||||
else
|
||||
echo ''
|
||||
echo "--- user awips does not exist"
|
||||
echo "--- you should set owner/group permissions for /awips2/cave and /awips2/alertviz:"
|
||||
echo "tried to run 'chown -R awips:awips /awips2/cave /awips2/alertviz'"
|
||||
fi
|
||||
|
||||
else
|
||||
if getent passwd awips &>/dev/null; then
|
||||
echo ''
|
||||
echo "Setting permissions to user awips:fxalpha"
|
||||
/bin/chown -R awips:fxalpha /awips2/cave /awips2/alertviz
|
||||
else
|
||||
else
|
||||
echo ''
|
||||
echo "--- user awips does not exist"
|
||||
echo "--- you should set owner/group permissions for /awips2/cave and /awips2/alertviz:"
|
||||
echo "tried to run 'chown -R awips:fxalpha /awips2/cave /awips2/alertviz'"
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
echo "Done..."
|
||||
|
|
Loading…
Add table
Reference in a new issue