align with miniserver

This commit is contained in:
David Young
2026-10-23 08:21:53 -06:00
parent 0f86e92b88
commit f851678d46
5 changed files with 13 additions and 69 deletions
+3 -3
View File
@@ -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 ## 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 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. `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.
-27
View File
@@ -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."
+5 -5
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Purpose : Install HamPackServer (run by CoreDesktop's `sibling add`) # Purpose : Install HamPackServer (run by MiniServer's `sibling add`)
# Print the logo # Print the logo
print_logo() { print_logo() {
@@ -69,16 +69,16 @@ install_wavelog() {
set -e set -e
SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
COREDESKTOP="$HOME/.local/share/coredesktop" MINISERVER="$HOME/.local/share/MiniServer"
LEGACY_DIR="$HOME/.local/share/HamPackServer" LEGACY_DIR="$HOME/.local/share/HamPackServer"
SUDOERS_FILE=/etc/sudoers.d/99-hampack-install SUDOERS_FILE=/etc/sudoers.d/99-hampack-install
clear || true clear || true
print_logo print_logo
if [ ! -d "$COREDESKTOP" ]; then if [ ! -d "$MINISERVER" ]; then
echo "HamPackServer requires CoreDesktop to be installed first." echo "HamPackServer requires MiniServer to be installed first."
echo "Please install CoreDesktop: https://coredesktop.federated.computer" echo "Please install MiniServer: wget -qO- https://gitea.young.computer/david/MiniServer/raw/branch/main/install.sh | bash"
exit 1 exit 1
fi fi
+1 -16
View File
@@ -3,25 +3,10 @@ SERVERS=(
# nothing at this time # nothing at this time
) )
# Ham server utilities # Ham server utilities (MiniServer installs the general server packages)
UTILITIES=( UTILITIES=(
alsa-lib alsa-lib
cmake
cockpit
cockpit-storaged
curl
docker
docker-compose
firewalld
gpsd gpsd
hamlib hamlib
libx11 libx11
nano
networkmanager
nodejs
npm
vi
wget
unzip
) )
+4 -18
View File
@@ -1,10 +1,10 @@
#!/bin/bash #!/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)" SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
COREDESKTOP="$HOME/.local/share/coredesktop" MINISERVER="$HOME/.local/share/MiniServer"
source "$COREDESKTOP/utils.sh" source "$MINISERVER/utils.sh"
# Scripts and the check tool find files in this repo through $HAMPACKSERVER_DIR # Scripts and the check tool find files in this repo through $HAMPACKSERVER_DIR
export HAMPACKSERVER_DIR="$SELF" export HAMPACKSERVER_DIR="$SELF"
@@ -23,7 +23,7 @@ step() {
} }
remove_stale_files() { 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" rm -f "$HOME/.local/bin/hampackserverupdate" "$HOME/.local/bin/hampackserverrefresh"
} }
@@ -37,17 +37,6 @@ install_hampackserver_packages() {
install_packages "${SERVERS[@]}" && install_packages "${UTILITIES[@]}" 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 # Install the hamclock system service, restarting hamclock if the service or
# the binary changed # the binary changed
install_hamclock_service() { install_hamclock_service() {
@@ -92,9 +81,6 @@ HAMCLOCK_MTIME=$(hamclock_mtime)
step "Removing stale HamPackServer files" remove_stale_files step "Removing stale HamPackServer files" remove_stale_files
step "Installing HamPackServer tools" install_tools step "Installing HamPackServer tools" install_tools
step "Installing HamPackServer packages" install_hampackserver_packages 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 compiled servers" bash "$SELF/install-compiled.sh"
step "Installing hamclock service" install_hamclock_service step "Installing hamclock service" install_hamclock_service
step "Installing openhamclock" bash "$SELF/install-openhamclock.sh" step "Installing openhamclock" bash "$SELF/install-openhamclock.sh"