Created
April 29, 2018 23:08
-
-
Save nicholasadamou/e4a4bb5b0acb8f7b4086559db4d49ff9 to your computer and use it in GitHub Desktop.
Start's the FruityWiFi daemon + web-interface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HTTP_PORT=8000 | |
HTTPS_PORT=8443 | |
ipaddr="$(hostname -I | cut -d ' ' -f1)" | |
/etc/init.d/fruitywifi restart && /etc/init.d/php7.0-fpm restart | |
sudo fuser -k "$HTTP_PORT"/tcp &>/dev/null | |
sudo fuser -k "$HTTPS_PORT"/tcp &>/dev/null | |
/etc/init.d/nginx restart | |
if [ "$?" -eq 0 ]; then | |
echo | |
echo "---------------------------" | |
echo "WEB-INTERFACE" | |
echo "---------------------------" | |
echo "http://"$ipaddr":8000 [http]" | |
echo "https://"$ipaddr":8443 [https]" | |
echo "user: admin" | |
echo "pass: admin" | |
echo | |
else | |
echo "An error occured while starting (fruitywifi|php7.0-fpm|nginx) service(s)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment