mirror of
https://github.com/ShaYmez/hblink3-docker-install.git
synced 2026-02-20 17:44:26 +13:00
Set perms and clean up code
This commit is contained in:
parent
a54af24ea5
commit
29da2b226d
31
hblink3-docker-install.sh
Normal file → Executable file
31
hblink3-docker-install.sh
Normal file → Executable file
@ -25,11 +25,11 @@
|
|||||||
# Step 2: Run this script on the computer.
|
# Step 2: Run this script on the computer.
|
||||||
# Step 4: Reboot after installation.
|
# Step 4: Reboot after installation.
|
||||||
# This is a docker version and you can use the following comands to control / maintain your server
|
# This is a docker version and you can use the following comands to control / maintain your server
|
||||||
# cd /etc/hblink3
|
# cd /etc/hblink3
|
||||||
# ./start.sh
|
# docker-compose up -d (starts the hblink3 docker container)
|
||||||
# ./stop.sh
|
# docker-compose down (shuts down the hblink container and stops the service)
|
||||||
# ./restart.sh
|
# docker-compose pull (updates the container to the latest docker image)
|
||||||
# ./update.sh
|
# systemctl |stop|start|restart|status hbmon (controls the HBMonv2 dash service)
|
||||||
# logs can be found in var/log/hblink or docker comand "docker container logs hblink"
|
# logs can be found in var/log/hblink or docker comand "docker container logs hblink"
|
||||||
#Lets begin-------------------------------------------------------------------------------------------------
|
#Lets begin-------------------------------------------------------------------------------------------------
|
||||||
if [ "$EUID" -ne 0 ];
|
if [ "$EUID" -ne 0 ];
|
||||||
@ -105,7 +105,7 @@ sleep 2
|
|||||||
echo Set userland-proxy to false...
|
echo Set userland-proxy to false...
|
||||||
echo '{ "userland-proxy": false}' > /etc/docker/daemon.json
|
echo '{ "userland-proxy": false}' > /etc/docker/daemon.json
|
||||||
fi
|
fi
|
||||||
echo "Done"
|
echo "Done."
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
echo "Downloading and installing HBMonv2 Dashboard"
|
echo "Downloading and installing HBMonv2 Dashboard"
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
@ -127,7 +127,7 @@ then
|
|||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Done"
|
echo "Done."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
@ -145,10 +145,10 @@ echo ""
|
|||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
echo "Install HBMonv2 Dashboard"
|
echo "Install HBMonv2 Dashboard"
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
sleep 2
|
sleep 2
|
||||||
cd /var/www/html/
|
cd /var/www/html/
|
||||||
mv /var/www/html/index.html /var/www/html/index_APACHE.html
|
mv /var/www/html/index.html /var/www/html/index_APACHE.html
|
||||||
cp -a /opt/HNMonv2/html/. /var/www/html/
|
cp -a /opt/HBMonv2/html/. /var/www/html/
|
||||||
if [ -e info.php ]
|
if [ -e info.php ]
|
||||||
then
|
then
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
@ -179,7 +179,7 @@ sleep 2
|
|||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
echo Make config directory...
|
echo Make config directory...
|
||||||
mkdir /etc/hblink3
|
mkdir /etc/hblink3
|
||||||
chmod 755 /etc/hblink3
|
chmod 755 /etc/hblink3
|
||||||
|
|
||||||
echo make json directory...
|
echo make json directory...
|
||||||
@ -187,9 +187,9 @@ sleep 2
|
|||||||
|
|
||||||
echo get json files...
|
echo get json files...
|
||||||
cd /etc/hblink3/json
|
cd /etc/hblink3/json
|
||||||
curl http://downloads.freedmr.uk/downloads/local_subscriber_ids.json -o subscriber_ids.json
|
curl http://downloads.freedmr.uk/downloads/local_subscriber_ids.json -o subscriber_ids.json
|
||||||
curl https://freestar.network/downloads/talkgroup_ids.json -o talkgroup_ids.json
|
curl https://freestar.network/downloads/talkgroup_ids.json -o talkgroup_ids.json
|
||||||
curl https://www.radioid.net/static/rptrs.json -o peer_ids.json
|
curl https://www.radioid.net/static/rptrs.json -o peer_ids.json
|
||||||
chmod -R 0755 /etc/hblink3/json/
|
chmod -R 0755 /etc/hblink3/json/
|
||||||
echo "Done"
|
echo "Done"
|
||||||
echo ""
|
echo ""
|
||||||
@ -583,10 +583,13 @@ figlet "HBlink Master"
|
|||||||
sleep 3
|
sleep 3
|
||||||
docker container logs hblink
|
docker container logs hblink
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
sleep 2
|
||||||
echo "Starting HBmon....."
|
echo "Starting HBmon....."
|
||||||
systemctl enable hbmon
|
systemctl enable hbmon
|
||||||
systemctl start hbmon
|
systemctl start hbmon
|
||||||
|
figlet "HBMonV2
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
sleep 2
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
@ -604,7 +607,7 @@ echo " docker-compose up -d "
|
|||||||
echo " More documentation can be found on the HBlink3 git repo "
|
echo " More documentation can be found on the HBlink3 git repo "
|
||||||
echo " https://github.com/ShaYmez/hblink3-docker-install "
|
echo " https://github.com/ShaYmez/hblink3-docker-install "
|
||||||
echo ""
|
echo ""
|
||||||
echo " Thanks for using this script. "
|
echo " Thanks for using this script. "
|
||||||
echo " Copyright © 2022 Shane Daley - M0VUB "
|
echo " Copyright © 2022 Shane Daley - M0VUB "
|
||||||
echo " More information can be found @ https://freestar.network/development "
|
echo " More information can be found @ https://freestar.network/development "
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user