check first, install later

This commit is contained in:
Daniel Hansson 2017-01-06 00:10:05 +01:00 committed by GitHub
parent 4a27999ffa
commit b367113a44

View File

@ -20,12 +20,6 @@ SCRIPTS=/var/scripts
# Must be root
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; }
echo "Starting to setup Solr & Nextant on Nextcloud..."
sleep 3
# Installing requirements
apt install default-jre -y
# Check if it's a clean install
if [ -d $SOLR_HOME ]
then
@ -35,6 +29,12 @@ then
exit 1
fi
echo "Starting to setup Solr & Nextant on Nextcloud..."
sleep 3
# Installing requirements
apt install default-jre -y
# Getting and installing Apache Solr
echo "Installing Apache Solr..."
mkdir -p $SOLR_HOME