mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
initial checkin -- May 27, 2017
This commit is contained in:
commit
845632d0ac
488 changed files with 41559 additions and 0 deletions
51
install-console
Executable file
51
install-console
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
# copy var files to /etc/xsce for subsequent use
|
||||
|
||||
#./install-init
|
||||
|
||||
# if not the first run, repo location is here
|
||||
|
||||
if [ -f /etc/xsce/xsce.env ]
|
||||
then
|
||||
. /etc/xsce/xsce.env
|
||||
cd $XSCE_DIR
|
||||
else
|
||||
XSCE_DIR=/opt/schoolserver/xsce
|
||||
mkdir -p /etc/xsce
|
||||
touch /etc/xsce/config_vars.yml
|
||||
fi
|
||||
|
||||
# don't track vars/local_vars.yml
|
||||
git update-index --assume-unchanged vars/local_vars.yml
|
||||
|
||||
PLAYBOOK="xsce-base.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
SELINUX_BEFORE=""
|
||||
SELINUX_AFTER=""
|
||||
|
||||
if [ ! -f $PLAYBOOK ]
|
||||
then
|
||||
echo "XSCE Playbook not found."
|
||||
echo "Please run this command from the top level of the git repo."
|
||||
echo "Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f /etc/selinux/config ]
|
||||
then
|
||||
SELINUX_BEFORE=`cat /etc/selinux/config | gawk -F= '/^SELINUX=/{ print $2 }'`
|
||||
fi
|
||||
|
||||
export ANSIBLE_LOG_PATH="$XSCE_DIR/xsce-install.log"
|
||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
|
||||
|
||||
if [ -f /etc/selinux/config ]
|
||||
then
|
||||
SELINUX_AFTER=`cat /etc/selinux/config | gawk -F= '/^SELINUX=/{ print $2 }'`
|
||||
fi
|
||||
|
||||
if [ "$SELINUX_BEFORE" != "$SELINUX_AFTER" ]; then
|
||||
echo "Rebooting ..."
|
||||
reboot
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue