Merge pull request #9 from ShaYmez/copilot/refactor-initial-setup

Refactor sbin scripts to V2.0 and enable path-independent installation
This commit is contained in:
M0VUB 2025-12-13 01:44:55 +00:00 committed by GitHub
commit ae8308c7df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 49 additions and 27 deletions

View File

@ -43,17 +43,18 @@ apt-get install -y git
apt update apt update
sudo su sudo su
``` ```
2. It is very important that the installer runs from the /opt directory! We will then want to get this repository and git clone it to the /opt directory. 2. Clone this repository to any directory of your choice. The installer will work from any location!
```sh ```sh
cd /opt
git clone https://github.com/ShaYmez/hblink3-docker-install git clone https://github.com/ShaYmez/hblink3-docker-install
``` ```
**Note:** While you can clone to any directory, `/opt` is still recommended for consistency.
3. Now enter into the cloned repo and execute the install script. No need to chmod as permissions are already satisfied. 3. Now enter into the cloned repo and execute the install script. No need to chmod as permissions are already satisfied.
```sh ```sh
cd hblink3-docker-install cd hblink3-docker-install
./hblink3-docker-install.sh ./hblink3-docker-install.sh
``` ```
4. follow the install and any prompts! It will prompt you for kernel updates if necessary. 4. Follow the install and any prompts! It will prompt you for kernel updates if necessary.
5. Once the installation is complete you will be presented with the first time run menu. Edit your config or exit to complete setup. 5. Once the installation is complete you will be presented with the first time run menu. Edit your config or exit to complete setup.
### New Menu System released with this installer! ### New Menu System released with this installer!

View File

@ -136,7 +136,7 @@ echo "Done."
echo "------------------------------------------------------------------------------" echo "------------------------------------------------------------------------------"
echo "Installing control scripts /usr/local/sbin....." echo "Installing control scripts /usr/local/sbin....."
echo "------------------------------------------------------------------------------" echo "------------------------------------------------------------------------------"
cd /opt/hblink3-docker-install/usr/local/sbin cd "$DIRDIR/usr/local/sbin"
cp -p menu /usr/local/sbin/hblink-menu cp -p menu /usr/local/sbin/hblink-menu
cp -p flush /usr/local/sbin/hblink-flush cp -p flush /usr/local/sbin/hblink-flush
cp -p update /usr/local/sbin/hblink-update cp -p update /usr/local/sbin/hblink-update
@ -167,6 +167,10 @@ fi
chmod 755 /usr/local/sbin/hblink-restart chmod 755 /usr/local/sbin/hblink-restart
chmod 755 /usr/local/sbin/hblink-initial-setup chmod 755 /usr/local/sbin/hblink-initial-setup
chmod 755 /usr/local/sbin/hblink-uninstall chmod 755 /usr/local/sbin/hblink-uninstall
# Save installer directory path for re-installation
mkdir -p /etc/hblink3
echo "$DIRDIR" > /etc/hblink3/.installer_path
chmod 644 /etc/hblink3/.installer_path
echo "Done." echo "Done."
echo "------------------------------------------------------------------------------" echo "------------------------------------------------------------------------------"

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -19,7 +20,7 @@
# Initial Setup MENU system..... # Initial Setup MENU system.....
while : ; do while : ; do
menuopt=$(whiptail --title "INTIAL SETUP - HBLINK3 DOCKER 1.9PL" --menu "Select option by using the up and down arrows on your keyboard. Once selected please press enter:" 23 56 13 \ menuopt=$(whiptail --title "INITIAL SETUP - HBLINK3 DOCKER V2.0" --menu "Select option by using the up and down arrows on your keyboard. Once selected please press enter:" 23 56 13 \
1 " Re-Install " \ 1 " Re-Install " \
2 " Bash Shell (Type 'exit' to return to menu) " \ 2 " Bash Shell (Type 'exit' to return to menu) " \
3 " Edit HBlink Config " \ 3 " Edit HBlink Config " \
@ -38,7 +39,15 @@ fi
# Action # Action
case $menuopt in case $menuopt in
1) 1)
sudo /opt/hblink3-docker-install/hblink3-docker-install.sh ;; # Read installer path from saved location, fallback to default if not found
INSTALLER_PATH=$(cat /etc/hblink3/.installer_path 2>/dev/null || echo "/opt/hblink3-docker-install")
if [ -f "$INSTALLER_PATH/hblink3-docker-install.sh" ]; then
sudo "$INSTALLER_PATH/hblink3-docker-install.sh"
else
echo "Error: Installer not found at $INSTALLER_PATH"
echo "Please ensure the installer directory still exists."
read -p "Press Enter to continue..."
fi ;;
2) 2)
sudo /usr/bin/bash ;; sudo /usr/bin/bash ;;
3) 3)

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -19,7 +20,7 @@
# Main MENU system..... # Main MENU system.....
while : ; do while : ; do
menuopt=$(whiptail --title "HBlink3 Control Version 1.9PL" --menu "Select option by using the up and down arrows on your keyboard. Once selected please press enter:" 24 56 14 \ menuopt=$(whiptail --title "HBlink3 Control Version 2.0" --menu "Select option by using the up and down arrows on your keyboard. Once selected please press enter:" 24 56 14 \
1 " Stop HBlink " \ 1 " Stop HBlink " \
2 " Start HBlink " \ 2 " Start HBlink " \
3 " Restart HBlink " \ 3 " Restart HBlink " \

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,10 +1,11 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER UNINSTALL SCRIPT V1.0 # HBLINK3 DOCKER UNINSTALL SCRIPT V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. # This script written by Shane Daley M0VUB.
# This script gracefully removes HBlink3 installation and all related components. # This script gracefully removes HBlink3 installation and all related components.
# Copyright (C) 2024 Shane P. Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -68,7 +69,7 @@ echo ""
echo " Your running on $ARC with Debian $VERSION " echo " Your running on $ARC with Debian $VERSION "
echo "" echo ""
echo " Thanks for using this script. " echo " Thanks for using this script. "
echo " Copyright © 2023 Shane Daley - M0VUB " echo " Copyright © 2025 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 ""
echo "*************************************************************************" echo "*************************************************************************"

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
# HBLINK3 DOCKER CONTROL SCRIPTS V1.9 # HBLINK3 DOCKER CONTROL SCRIPTS V2.0
# Version 13122025
# This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated. # This script written by Shane Daley M0VUB. The script gracefully shuts down services while services are cleaned and logs are truncated.
# We can also add items in this script for future use like updates or further log trims. # We can also add items in this script for future use like updates or further log trims.
# Add to the cron tab for auto execution # Add to the cron tab for auto execution
# Copyright (C) 2020 Shane P, Daley M0VUB <support@gb7nr.co.uk> # Copyright (C) 2020-2025 Shane P. Daley M0VUB <support@gb7nr.co.uk>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by