diff --git a/README.md b/README.md index 46b1225..7771ef1 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -A collection of Ham Radio server utilities to transform [CoreDesktop](https://gitea.federated.computer/Federated_Computer/coredesktop) machines in to Ham Radio servers. +A collection of Ham Radio server utilities to transform [MiniServer](https://gitea.young.computer/david/MiniServer) machines in to Ham Radio servers. ## Installation -HamPackServer is a CoreDesktop sibling project. With CoreDesktop installed, run: +HamPackServer is a MiniServer sibling project. With MiniServer installed, run: ``` sibling add https://gitea.young.computer/david/HamPackServer.git ``` -This clones HamPackServer into `~/.local/share/siblings/HamPackServer` and runs its `install.sh`. From then on, CoreDesktop's `update` command pulls HamPackServer and runs its `update.sh`, so HamPackServer stays current along with the rest of the system. Re-run the `sibling add` command above to repair an install. +This clones HamPackServer into `~/.local/share/siblings/HamPackServer` and runs its `install.sh`. From then on, MiniServer's `update` command pulls HamPackServer and runs its `update.sh`, so HamPackServer stays current along with the rest of the system. Re-run the `sibling add` command above to repair an install. `update` never prompts. If it can't tell which version of a compiled server is installed, it skips that server; re-run the `sibling add` command above to be asked whether to build it. diff --git a/fix-networking.sh b/fix-networking.sh deleted file mode 100644 index c89ca4c..0000000 --- a/fix-networking.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Purpose : Configure Avahi mDNS and disable systemd-resolved - -set -e - -echo "Installing Avahi and nss-mdns..." -sudo pacman -S --needed --noconfirm avahi nss-mdns - -echo "Enabling Avahi daemon..." -sudo systemctl enable avahi-daemon.service - -echo "Updating /etc/nsswitch.conf..." -sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf - -# Verify the change was made -if grep -q "mdns_minimal" /etc/nsswitch.conf; then - echo "nsswitch.conf updated successfully." -else - echo "Error: nsswitch.conf was not updated. Please check the file manually." - exit 1 -fi - -echo "Copying Avahi SSH service file..." -sudo cp /usr/share/doc/avahi/ssh.service /etc/avahi/services/ - -echo "Avahi mDNS configuration complete." diff --git a/install.sh b/install.sh index 9bf95d1..8410a44 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Purpose : Install HamPackServer (run by CoreDesktop's `sibling add`) +# Purpose : Install HamPackServer (run by MiniServer's `sibling add`) # Print the logo print_logo() { @@ -69,16 +69,16 @@ install_wavelog() { set -e SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -COREDESKTOP="$HOME/.local/share/coredesktop" +MINISERVER="$HOME/.local/share/MiniServer" LEGACY_DIR="$HOME/.local/share/HamPackServer" SUDOERS_FILE=/etc/sudoers.d/99-hampack-install clear || true print_logo -if [ ! -d "$COREDESKTOP" ]; then - echo "HamPackServer requires CoreDesktop to be installed first." - echo "Please install CoreDesktop: https://coredesktop.federated.computer" +if [ ! -d "$MINISERVER" ]; then + echo "HamPackServer requires MiniServer to be installed first." + echo "Please install MiniServer: wget -qO- https://gitea.young.computer/david/MiniServer/raw/branch/main/install.sh | bash" exit 1 fi diff --git a/packages.conf b/packages.conf index 3f3e0d3..2c1c7b7 100644 --- a/packages.conf +++ b/packages.conf @@ -3,25 +3,10 @@ SERVERS=( # nothing at this time ) -# Ham server utilities +# Ham server utilities (MiniServer installs the general server packages) UTILITIES=( alsa-lib - cmake - cockpit - cockpit-storaged - curl - docker - docker-compose - firewalld gpsd hamlib libx11 - nano - networkmanager - nodejs - npm - vi - wget - unzip ) - diff --git a/update.sh b/update.sh index 0a37ceb..ac6db55 100755 --- a/update.sh +++ b/update.sh @@ -1,10 +1,10 @@ #!/bin/bash # -# Purpose : Keep HamPackServer current (run by CoreDesktop's `update`, and by install.sh) +# Purpose : Keep HamPackServer current (run by MiniServer's `update`, and by install.sh) SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -COREDESKTOP="$HOME/.local/share/coredesktop" -source "$COREDESKTOP/utils.sh" +MINISERVER="$HOME/.local/share/MiniServer" +source "$MINISERVER/utils.sh" # Scripts and the check tool find files in this repo through $HAMPACKSERVER_DIR export HAMPACKSERVER_DIR="$SELF" @@ -23,7 +23,7 @@ step() { } remove_stale_files() { - # Replaced by CoreDesktop's `update` and `sibling add` + # Replaced by MiniServer's `update` and `sibling add` rm -f "$HOME/.local/bin/hampackserverupdate" "$HOME/.local/bin/hampackserverrefresh" } @@ -37,17 +37,6 @@ install_hampackserver_packages() { install_packages "${SERVERS[@]}" && install_packages "${UTILITIES[@]}" } -install_pm2() { - command -v pm2 &> /dev/null || npm install pm2 -g --prefix "$HOME/.local" -} - -enable_cockpit() { - if ! systemctl is-enabled cockpit.socket &> /dev/null; then - sudo systemctl enable --now cockpit.socket && - echo "Cockpit enabled. Access it at http://localhost:9090" - fi -} - # Install the hamclock system service, restarting hamclock if the service or # the binary changed install_hamclock_service() { @@ -92,9 +81,6 @@ HAMCLOCK_MTIME=$(hamclock_mtime) step "Removing stale HamPackServer files" remove_stale_files step "Installing HamPackServer tools" install_tools step "Installing HamPackServer packages" install_hampackserver_packages -step "Installing pm2" install_pm2 -step "Enabling Cockpit" enable_cockpit -step "Configuring networking" bash "$SELF/fix-networking.sh" step "Installing compiled servers" bash "$SELF/install-compiled.sh" step "Installing hamclock service" install_hamclock_service step "Installing openhamclock" bash "$SELF/install-openhamclock.sh"