diff --git a/YSFReflector-debian-installer b/YSFReflector-debian-installer index 102b5e6..2a6f2ca 100755 --- a/YSFReflector-debian-installer +++ b/YSFReflector-debian-installer @@ -22,9 +22,12 @@ then fi DIRDIR=$(pwd) YSFREPO=https://github.com/g4klx/YSFClients.git -DEP="wget git build-essential" +YSFDASHREPO=https://github.com/dg9vh/YSFReflector-Dashboard.git +DEP="wget git build-essential apache2 php libapache2-mod-php php7.0-mbstring" YSFINSTDIR=/root/reflector-install-files/ysfreflector YSFAPPDIR=/ysfreflector +YSFDASDIR=/root/reflector-install-files/ysfdash +YSFWEBDIR=/var/www/ysf echo "" echo "------------------------------------------------------------------------------" read -p "What will the name of your reflector be? 16 Characters MAX, this includes spaces. " YSFNAME @@ -43,6 +46,9 @@ do read -p "What is the description? 14 Characters MAX, this includes spaces. " YSFDESC YSFDESCC=$(expr length "$YSFDESC") done +echo "------------------------------------------------------------------------------" +echo "" +read -p "What is the FQDN of the YSF Reflector dashboard? Example: ysf.domain.com " YSFDOMAIN echo "" echo "------------------------------------------------------------------------------" echo "Installing required software... " @@ -91,11 +97,27 @@ chown mmdvm: /var/log/YSFReflector echo "Copying ysfrelfector to systemd...... " cp $DIRDIR/templates/ysfreflector.service /etc/systemd/system systemctl daemon-reload +echo "------------------------------------------------------------------------------" +echo "Installing the YSF Dashboard and configuring apache... " +echo "------------------------------------------------------------------------------" +cd $YSFDASDIR +git clone $YSFDASHREPO +cp -R $YSFDASDIR/YSFReflector-Dashboard/* $YSFWEBDIR/ +mkdir $YSFWEBDIR/config +cp $DIRDIR/templates/config.php $YSFWEBDIR/config/ +mv $YSFWEBDIR/setup.php $YSFDASDIR/original-setup.php +#Copy apache vhost files over for ysf +cp $DIRDIR/templates/apache.tbd.conf /etc/apache2/sites-available/$YSFDOMAIN.conf +sed -i "s/apache.tbd/$YSFDOMAIN/g" /etc/apache2/sites-available/$YSFDOMAIN.conf +sed -i "s/ysf-xlxd/ysf/g" /etc/apache2/sites-available/$YSFDOMAIN.conf +a2ensite $YSFDOMAIN +service apache2 restart +systemctl start ysfreflector echo "" echo "" echo "******************************************************************************" echo "" -echo " This concludes the install of YSFReflector..... " +echo " This concludes the install of YSFReflector and Dashboard..... " echo "" echo "******************************************************************************" echo "" @@ -106,4 +128,7 @@ echo " To start YSFReflector: 'systemctl start ysfreflector' " echo "" echo " To stop YSFReflector: 'systemctl stop ysfreflector' " echo "" +echo " Your web dashboard can be found at: " +echo " http://$YSFDOMAIN " +echo "" echo "------------------------------------------------------------------------------" diff --git a/templates/apache.tbd.conf b/templates/apache.tbd.conf new file mode 100644 index 0000000..e66f957 --- /dev/null +++ b/templates/apache.tbd.conf @@ -0,0 +1,4 @@ + + ServerName apache.tbd + DocumentRoot /var/www/ysf-xlxd + diff --git a/templates/config.php b/templates/config.php new file mode 100644 index 0000000..791988c --- /dev/null +++ b/templates/config.php @@ -0,0 +1,16 @@ +