From 983951aeb0c6604133e73d098e6fff880cb57252 Mon Sep 17 00:00:00 2001 From: Ross McKelvie Date: Wed, 8 Jul 2020 23:34:28 -0500 Subject: [PATCH] Better start script name --- .gitignore | 1 + Makefile | 8 +++++++- README.md | 17 ++++++++++++++--- files/home/pi/dw-start-cron.sh | 2 +- .../pi/{rtl-dw-start.sh => pigate-start.sh} | 0 packer/aprs-pigate.json | 6 +++--- 6 files changed, 26 insertions(+), 8 deletions(-) rename files/home/pi/{rtl-dw-start.sh => pigate-start.sh} (100%) diff --git a/.gitignore b/.gitignore index 04d6521..5689a17 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ packer_cache .DS_Store wpa_supplicant.conf sdr.conf +*.zip diff --git a/Makefile b/Makefile index e037556..28105f4 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +GIT_HASH := $(shell git rev-parse --short HEAD) + all: clean build clean: @@ -15,4 +17,8 @@ build: docker -v ${PWD}/output-arm-image:/build/output-arm-image \ -e PACKER_CACHE_DIR=/build/packer_cache \ docker.pkg.github.com/solo-io/packer-builder-arm-image/packer-builder-arm build packer/aprs-pigate.json - mv output-arm-image/image output-arm-image/aprs-pigate.img + mv output-arm-image/image aprs-pigate.img + + +archive: + zip -jrX9 aprs-pigate-${GIT_HASH}.zip output-arm-image/aprs-pigate.img diff --git a/README.md b/README.md index 6545ff4..809fa8f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ # aprs-pigate Prebuilt Raspberry Pi image for running a HAM radio APRS Internet Gateway using [direwolf] and [rtl-sdr] +## Feature List +:star: Pre-compiled `direwolf` and `rtl-sdr` library + +:star: Pre-configured cron job runs every minute to make sure direwolf is running + +:star: Logrotate keeps text file logs for the last 14 days and auto deletes older logs + +:star: Works out-of-the-box receive-only igate with the [rtl-sdr] v3 kit. + +:star: Easily configured for digipeater operation with a usb sound card connected to a radio + ## Getting Started ### Installation @@ -11,12 +22,12 @@ Prebuilt Raspberry Pi image for running a HAM radio APRS Internet Gateway using Once the pi is running, it should be available on your network with hostname `aprs-pigate` and accessible via SSH `pi@aprs-pigate` using the default raspberry password. It is a good idea to change this once logged in, or disable passwords altogether and use SSH keys, which you can do by modifying the `user-data` file accessible on the boot partition after flashing. ### Viewing Dire Wolf Output -The startup script creates a `screen` and executes the startup script [`rtl-dw-start.sh`]. If at any time you want to explore the logs, you can ssh into your pigate and run the command `screen -r direwolf`. CTRL+C to leave the screen. +The startup script creates a `screen` and executes the startup script [`pigate-start.sh`]. If at any time you want to explore the logs, you can ssh into your pigate and run the command `screen -r direwolf`. CTRL+C to leave the screen. Logs are also written to `/home/pi/aprslogs/aprs.log`. You can view these with commands like `less` or `tail`, and generally may be easier to work with than the direwolf screen. ### Customizing the Start Script -If you are setting up a digipeater, you can disable the Software Defined Radio by creating an empty file `DISABLE_SDR` and placing it into the boot folder of your SD card along with `direwolf.conf`. See the [`rtl-dw-start.sh`] startup script for more details. +If you are setting up a digipeater, you can disable the Software Defined Radio by creating an empty file `DISABLE_SDR` and placing it into the boot folder of your SD card along with `direwolf.conf`. See the [`pigate-start.sh`] startup script for more details. ## Contributing & Development This project uses the following dependencies: @@ -29,7 +40,7 @@ Run `make build` to start building your first image. [aprs.fi]: https://aprs.fi [direwolf]: https://github.com/wb2osz/direwolf [`flash`]: https://github.com/hypriot/flash +[`pigate-start.sh`]: files/home/pi/pigate-start.sh [`packer-build-arm-image`]: https://github.com/solo-io/packer-builder-arm-image/ [rtl-sdr]: https://www.rtl-sdr.com/ -[`rtl-dw-start.sh`]: files/home/pi/rtl-dw-start.sh [wpa_supplicant.conf]: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md diff --git a/files/home/pi/dw-start-cron.sh b/files/home/pi/dw-start-cron.sh index bce508c..cac38d8 100644 --- a/files/home/pi/dw-start-cron.sh +++ b/files/home/pi/dw-start-cron.sh @@ -16,7 +16,7 @@ # e.g. DIREWOLF="/usr/local/bin/direwolf" DIREWOLF="direwolf" -DWCMD="/home/pi/rtl-dw-start.sh" +DWCMD="/home/pi/pigate-start.sh" # Where will logs go - needs to be writable by non-root users LOGFILE=/var/tmp/dw-start.log diff --git a/files/home/pi/rtl-dw-start.sh b/files/home/pi/pigate-start.sh similarity index 100% rename from files/home/pi/rtl-dw-start.sh rename to files/home/pi/pigate-start.sh diff --git a/packer/aprs-pigate.json b/packer/aprs-pigate.json index 0f4169d..9a5ddc2 100644 --- a/packer/aprs-pigate.json +++ b/packer/aprs-pigate.json @@ -42,8 +42,8 @@ }, { "type": "file", - "source": "files/home/pi/rtl-dw-start.sh", - "destination": "/home/pi/rtl-dw-start.sh" + "source": "files/home/pi/pigate-start.sh", + "destination": "/home/pi/pigate-start.sh" }, { "type": "file", @@ -54,7 +54,7 @@ "type": "shell", "inline": [ "chmod +x /home/pi/dw-start-cron.sh", - "chmod +x /home/pi/rtl-dw-start.sh", + "chmod +x /home/pi/pigate-start.sh", "chown -R pi:pi /home/pi" ] },