diff --git a/.github/workflows/node-red-pkg.yml b/.github/workflows/node-red-pkg.yml index 80ff7af..9e4e3a4 100644 --- a/.github/workflows/node-red-pkg.yml +++ b/.github/workflows/node-red-pkg.yml @@ -15,7 +15,6 @@ jobs: - name: Create package structure run: | mkdir -p .debpkg/home/node-red/.node-red - ls -alR cp shared_files/node-red/aryaos_flows.json .debpkg/home/node-red/.node-red/flows.json # create DEBIAN directory if you want to add other pre/post scripts mkdir -p .debpkg/DEBIAN diff --git a/.github/workflows/pi-gen.yml b/.github/workflows/pi-gen.yml index 797af17..f725e24 100644 --- a/.github/workflows/pi-gen.yml +++ b/.github/workflows/pi-gen.yml @@ -20,14 +20,9 @@ jobs: uses: xom9ikk/dotenv@v2.3.0 with: path: pi-gen/ - - - name: Echo env variables - run: env - name: Build AryaOS image uses: usimd/pi-gen-action@v1 - env: - SHARED_FILES: ${{ env.SHARED_FILES }} with: pi-gen-dir: pi-gen-src # Disable the renaming of the first user during the first boot. This make it so diff --git a/Makefile b/Makefile index 38be07f..77c0ff5 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ # +sync: + rsync -va ../aryaos kelp.local:~/src/SNS/ + mkdocs: pip install -r docs/requirements.txt mkdocs serve diff --git a/pi-gen/Makefile b/pi-gen/Makefile index 5b8efca..cb888e7 100644 --- a/pi-gen/Makefile +++ b/pi-gen/Makefile @@ -21,9 +21,6 @@ pi-gen: git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git touch ./pi-gen/stage2/SKIP_IMAGES ./pi-gen/stage2/SKIP_NOOBS -copy: - rsync -va ../../aryaos kelp.local:~/src/SNS/ - sync: copy skip: diff --git a/pi-gen/config b/pi-gen/config index 1dd56c1..6877461 100644 --- a/pi-gen/config +++ b/pi-gen/config @@ -17,7 +17,7 @@ # shellcheck disable=SC2034 AOS_FLAVOR="AryaOS" -IMG_NAME="aryaos-2.0.0-beta01" +IMG_NAME="aryaos" PI_GEN_RELEASE="AryaOS: The Operating System for Modern Situational Awareness." TARGET_HOSTNAME="aryaos" FIRST_USER_NAME="pi" @@ -36,4 +36,4 @@ APT_PROXY="http://172.17.2.88:3142" DUMP1090_RECEIVER_SERIAL="stx:1090:0" DUMP978_RECEIVER_SERIAL="stx:978:0" COMITUP_WEB_PORT="9080" -SHARED_FILES="../shared_files" \ No newline at end of file +export SHARED_FILES="${STAGE_DIR}/../../shared_files" diff --git a/pi-gen/stage07-air/01-files/00-run.sh b/pi-gen/stage07-air/01-files/00-run.sh index ede76b4..9c1e9bf 100755 --- a/pi-gen/stage07-air/01-files/00-run.sh +++ b/pi-gen/stage07-air/01-files/00-run.sh @@ -14,5 +14,5 @@ # limitations under the License. # -install -v -m 600 files/blacklist-rtl-sdr.conf "${ROOTFS_DIR}/etc/modprobe.d/" -install -v -m 600 files/flightaware-apt-repository_1.2_all.deb "${ROOTFS_DIR}/tmp/flightaware-apt-repository_1.2_all.deb" +install -v -m 600 "${SHARED_FILES}/air/blacklist-rtl-sdr.conf" "${ROOTFS_DIR}/etc/modprobe.d/" +install -v -m 600 "${SHARED_FILES}/air/flightaware-apt-repository_1.2_all.deb" "${ROOTFS_DIR}/usr/src/flightaware-apt-repository_1.2_all.deb" diff --git a/pi-gen/stage07-air/02-install-repos/00-run-chroot.sh b/pi-gen/stage07-air/02-install-repos/00-run-chroot.sh index b534d79..8650a20 100755 --- a/pi-gen/stage07-air/02-install-repos/00-run-chroot.sh +++ b/pi-gen/stage07-air/02-install-repos/00-run-chroot.sh @@ -14,5 +14,5 @@ # limitations under the License. # -dpkg -i /tmp/flightaware-apt-repository_1.2_all.deb +dpkg -i /usr/src/flightaware-apt-repository_1.2_all.deb apt update diff --git a/pi-gen/stage07-air/04-aryaair/00-run.sh b/pi-gen/stage07-air/04-aryaair/00-run.sh index 4d46e04..b41d48f 100755 --- a/pi-gen/stage07-air/04-aryaair/00-run.sh +++ b/pi-gen/stage07-air/04-aryaair/00-run.sh @@ -14,18 +14,20 @@ # limitations under the License. # -install -v -m 755 files/99-aryaos-recorder.conf "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/" +install -v -m 755 "${SHARED_FILES}/aryaos/99-aryaos-recorder.conf" "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/" # dump1090-fa -install -v -m 644 files/dump1090-fa.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 644 files/dump978-fa.service "${ROOTFS_DIR}/lib/systemd/system/" +install -v -m 644 "${SHARED_FILES}/air/dump1090-fa.service" "${ROOTFS_DIR}/lib/systemd/system/" +install -v -m 644 "${SHARED_FILES}/air/dump978-fa.service" "${ROOTFS_DIR}/lib/systemd/system/" # readsb -install -v -m 755 files/readsb-install.sh "${ROOTFS_DIR}/home/pi/" -install -v -m 755 files/tar1090-install.sh "${ROOTFS_DIR}/home/pi/" -install -v -m 755 files/readsb-set-location.sh "${ROOTFS_DIR}/usr/local/bin/" -install -v -m 755 files/readsb-gain.sh "${ROOTFS_DIR}/usr/local/bin/" -install -v -m 755 files/run_readsb.sh "${ROOTFS_DIR}/usr/local/sbin/" -install -v -m 644 files/readsb_3.14.1621_arm64.deb "${ROOTFS_DIR}/home/pi/" +install -v -m 755 "${SHARED_FILES}/air/readsb-install.sh" "${ROOTFS_DIR}/usr/src/" +install -v -m 755 "${SHARED_FILES}/air/tar1090-install.sh" "${ROOTFS_DIR}/usr/src/" -install -v -m 755 files/89-skyaware.conf "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/" +install -v -m 755 "${SHARED_FILES}/air/readsb-set-location.sh" "${ROOTFS_DIR}/usr/local/bin/" +install -v -m 755 "${SHARED_FILES}/air/readsb-gain.sh" "${ROOTFS_DIR}/usr/local/bin/" +install -v -m 755 "${SHARED_FILES}/air/run_readsb.sh" "${ROOTFS_DIR}/usr/local/sbin/" + +install -v -m 644 "${SHARED_FILES}/air/readsb_3.14.1621_arm64.deb" "${ROOTFS_DIR}/usr/src/" + +install -v -m 755 "${SHARED_FILES}/air/89-skyaware.conf" "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/" diff --git a/pi-gen/stage07-air/04-aryaair/01-run-chroot.sh b/pi-gen/stage07-air/04-aryaair/01-run-chroot.sh index bf25916..7847d3e 100755 --- a/pi-gen/stage07-air/04-aryaair/01-run-chroot.sh +++ b/pi-gen/stage07-air/04-aryaair/01-run-chroot.sh @@ -25,6 +25,7 @@ DUMP978_RECEIVER_SERIAL="stx:978:0" sed --follow-symlinks -i -E -e "s/driver=rtlsdr /driver=rtlsdr,serial=$DUMP978_RECEIVER_SERIAL /" /etc/default/dump978-fa +cd /usr/src wget https://github.com/snstac/aircot/releases/latest/download/aircot_latest_all.deb apt install -f ./aircot_latest_all.deb @@ -33,12 +34,13 @@ apt install -f ./adsbcot_latest_all.deb # readsb # bash /home/pi/readsb-install.sh -dpkg -i /home/pi/readsb_3.14.1621_arm64.deb +dpkg -i /usr/src/readsb_3.14.1621_arm64.deb + READSB_RECEIVER_SERIAL="stx:1090:0" sed --follow-symlinks -i -E -e "s/RECEIVER_OPTIONS.*/RECEIVER_OPTIONS=\"--device $READSB_RECEIVER_SERIAL --device-type rtlsdr --gain -10 --ppm 0\"/" /etc/default/readsb # tar1090 -bash /home/pi/tar1090-install.sh +bash /usr/src/tar1090-install.sh # Disable everything diff --git a/pi-gen/stage07-air/04-aryaair/02-run.sh b/pi-gen/stage07-air/04-aryaair/02-run.sh index a4e2249..7cb2143 100755 --- a/pi-gen/stage07-air/04-aryaair/02-run.sh +++ b/pi-gen/stage07-air/04-aryaair/02-run.sh @@ -5,7 +5,9 @@ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -14,6 +16,5 @@ # limitations under the License. # -# readsb -install -v -m 644 files/readsb.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 755 files/89-skyaware.conf "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/" +install -v -m 644 "${SHARED_FILES}/air/readsb.service" "${ROOTFS_DIR}/lib/systemd/system/" +install -v -m 755 "${SHARED_FILES}/air/89-skyaware.conf" "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/" diff --git a/pi-gen/stage07-air/04-aryaair/files/99-aryaos-recorder.conf b/pi-gen/stage07-air/04-aryaair/files/99-aryaos-recorder.conf deleted file mode 100644 index 500d62e..0000000 --- a/pi-gen/stage07-air/04-aryaair/files/99-aryaos-recorder.conf +++ /dev/null @@ -1,3 +0,0 @@ -$HTTP["url"] =~ "^/logs($|/)" { - dir-listing.activate = "enable" - } \ No newline at end of file diff --git a/pi-gen/stage07-air/04-aryaair/files/readsb.service b/pi-gen/stage07-air/04-aryaair/files/readsb.service deleted file mode 100644 index 18b47f2..0000000 --- a/pi-gen/stage07-air/04-aryaair/files/readsb.service +++ /dev/null @@ -1,26 +0,0 @@ -# AryaOS readsb.service -# readsb service for systemd - -[Unit] -Description=readsb ADS-B receiver -Documentation=https://github.com/wiedehopf/readsb -Wants=network.target -After=network.target - -[Service] -# EnvironmentFile=/etc/default/readsb -User=readsb -RuntimeDirectoryMode=0755 -# Allows centralized aircraft.json: -RuntimeDirectory=adsb -ExecStart=/usr/local/sbin/run_readsb.sh -Type=simple -Type=simple -Restart=always -RestartSec=15 -StartLimitInterval=1 -StartLimitBurst=100 -Nice=-5 - -[Install] -WantedBy=default.target diff --git a/pi-gen/stage08-sea/00-install/00-run.sh b/pi-gen/stage08-sea/00-install/00-run.sh index cf89aba..07a5a71 100755 --- a/pi-gen/stage08-sea/00-install/00-run.sh +++ b/pi-gen/stage08-sea/00-install/00-run.sh @@ -1,12 +1,13 @@ #!/bin/bash -e -# AryaOS 00-run.sh -# Configures pi image for AIS-catcher install, including serial settings. +# 00-run.sh Configures pi image for AIS-catcher install, including serial settings. # # Copyright Sensors & Signals LLC https://www.snstac.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,8 +16,7 @@ # limitations under the License. # -# AIS-catcher -install -v -m 644 files/AIS-catcher_0.58.1_arm64.deb "${ROOTFS_DIR}/home/pi/" -install -v -m 644 files/ais-catcher.default.conf "${ROOTFS_DIR}/etc/default/ais-catcher" -install -v -m 644 files/ais-catcher.service "${ROOTFS_DIR}/lib/systemd/system/" +install -v -m 644 "${SHARED_FILES}/sea/AIS-catcher_0.58.1_arm64.deb" "${ROOTFS_DIR}/usr/src/" +install -v -m 644 "${SHARED_FILES}/sea/ais-catcher.default.conf" "${ROOTFS_DIR}/etc/default/ais-catcher" +install -v -m 644 "${SHARED_FILES}/sea/ais-catcher.service" "${ROOTFS_DIR}/lib/systemd/system/" diff --git a/pi-gen/stage08-sea/00-install/01-run-chroot.sh b/pi-gen/stage08-sea/00-install/01-run-chroot.sh index 7bb1261..5acf1dd 100755 --- a/pi-gen/stage08-sea/00-install/01-run-chroot.sh +++ b/pi-gen/stage08-sea/00-install/01-run-chroot.sh @@ -16,11 +16,12 @@ # AIS-catcher -dpkg -i /home/pi/AIS-catcher_0.58.1_arm64.deb +dpkg -i /usr/src/AIS-catcher_0.58.1_arm64.deb id aiscatcher || useradd --system aiscatcher usermod -a -G plugdev aiscatcher usermod -a -G dialout aiscatcher # aiscot +cd /usr/src wget https://github.com/snstac/aiscot/releases/latest/download/aiscot_latest_all.deb apt install -f ./aiscot_latest_all.deb \ No newline at end of file diff --git a/pi-gen/stage08-sea/00-install/files/AIS-catcher-main.zip b/pi-gen/stage08-sea/00-install/files/AIS-catcher-main.zip deleted file mode 100644 index 23ffc08..0000000 Binary files a/pi-gen/stage08-sea/00-install/files/AIS-catcher-main.zip and /dev/null differ diff --git a/pi-gen/stage08-sea/00-install/files/ais-catcher.default.conf b/pi-gen/stage08-sea/00-install/files/ais-catcher.default.conf deleted file mode 100644 index 1c2a88c..0000000 --- a/pi-gen/stage08-sea/00-install/files/ais-catcher.default.conf +++ /dev/null @@ -1,21 +0,0 @@ -# ais-catcher.default.conf - -# [-e baudrate port - open device at serial port with given baudrate] -SERIAL_BAUDRATE=38400 -SERIAL_PORT=/dev/ttyUSB1 - -# [-u xxx.xx.xx.xx yyy - UDP destination address and port (default: off)] -UDP_DEST_ADDR=127.0.0.1 -UDP_DEST_PORT=5050 - -# [-v [option: xx] - enable verbose mode, optional to provide update frequency of xx seconds (default: false)] -# VERBOSE=10 - -# [-N [optional: port][optional settings] - start http server at port, see README for details] -HTTP_PORT=8100 - -# TODO -# The user can make a page in markdown format. The content will be shown in the About tab of the web viewer: -# AIS-catcher -N 8100 ABOUT about.md -# HTTP_SETTINGS=ABOUT AryaOS.md - diff --git a/pi-gen/stage09-uas/00-install/00-run.sh b/pi-gen/stage09-uas/00-install/00-run.sh index 6308671..27c82e0 100755 --- a/pi-gen/stage09-uas/00-install/00-run.sh +++ b/pi-gen/stage09-uas/00-install/00-run.sh @@ -15,5 +15,5 @@ # -rsync -va files/docker-uas-broker "${ROOTFS_DIR}/home/pi/" -rsync -va files/docker-uas-sensor "${ROOTFS_DIR}/home/pi/" \ No newline at end of file +rsync -va "${SHARED_FILES}/uas/docker-uas-broker" "${ROOTFS_DIR}/home/pi/" +rsync -va "${SHARED_FILES}/uas/docker-uas-sensor" "${ROOTFS_DIR}/home/pi/" \ No newline at end of file diff --git a/pi-gen/stage09-uas/00-install/01-run-chroot.sh b/pi-gen/stage09-uas/00-install/01-run-chroot.sh index e01b694..50cd186 100755 --- a/pi-gen/stage09-uas/00-install/01-run-chroot.sh +++ b/pi-gen/stage09-uas/00-install/01-run-chroot.sh @@ -5,7 +5,9 @@ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-broker/docker-compose.yml b/pi-gen/stage09-uas/00-install/files/docker-uas-broker/docker-compose.yml deleted file mode 100644 index b84f590..0000000 --- a/pi-gen/stage09-uas/00-install/files/docker-uas-broker/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '2' - -services: - mqtt_broker: - image: "eclipse-mosquitto" - volumes: - - ./mosquitto.conf:/mosquitto/config/mosquitto.conf - - ./mosquitto_certs:/etc/mosquitto/certs/ - ports: - - "1883:1883" - hostname: mqtt_broker - restart: always - network_mode: "bridge" - mem_limit: 256m #optional, limit maximum memory usage to 256 Mbyte - mem_reservation: 64M #optional, in case of low memory on the host, limit memory usage to 64 Mbyte - cpus: 1 # optional guarantee at least 100% CPU time of one CPU core diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-broker/mosquitto.conf b/pi-gen/stage09-uas/00-install/files/docker-uas-broker/mosquitto.conf deleted file mode 100644 index c8348ac..0000000 --- a/pi-gen/stage09-uas/00-install/files/docker-uas-broker/mosquitto.conf +++ /dev/null @@ -1,2 +0,0 @@ -listener 1883 -allow_anonymous true diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/dronescout.conf b/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/dronescout.conf deleted file mode 100644 index 188948b..0000000 --- a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/dronescout.conf +++ /dev/null @@ -1,37 +0,0 @@ -# -# Configuration file -# (c) Bluemark Innovations BV 2022 - 2024 - -[global] -sensorID = ds240100000100 ; sensor ID - -[mqtt] -host = localhost ; MQTT host -port = 1883 ; MQTT port -topic = ; leave empty to use default topic based on sensorID -QoSlevel = 1 ; QoS level 0, 1 or 2 -username = ; leave empty if not used -password = ; leave empty if not used -keepalive = 60 ; keep alive period in seconds. -clientID = ; set clientID or to random to generate random ID, leave empty for default setting -ssl = 0 ; 0 disable SSL in MQTT connection 1, enable SSL -ssl_verify = 0 ; disable SSL verification of SSL key of MQTT broker (useful for self-generated keys) -CAfile = /root/certs/ca.crt ; location to CA file for SSL connection -CRTfile = /root/certs/client.crt ; location to CRT file for SSL connection -KEYfile = /root/certs/client.key ; locaton to KEY file for SSL connection -compression = lzma ; none or lzma. In case of lzma, payload is compressed. -retain = 0 ; set to 1 in order to retain messages on mqtt broker -transmit_mode = 2 ; 0 send MQTT message for each new message, 1 every second -transmit_mode_2_interval_ms = 250 ; set the transmission interval (ms)intransmit mode 2 (valid range: 50 to 60000) -aggregate_data = 1 ; 0 send MQTT message with latest received message only, 1 send all information about this RemoteID device - -[interface] -WLAN_USB_1 = wlan1 ; interface for WLAN 1 adapter -WLAN_USB_2 = wlan2 ; interface for WLAN 2 adapter -WLAN_USB_3 = wlan3 ; interface for WLAN 2 adapter -BT_UART_1 = /dev/ttyACM0 ; interface for Bluetooth adapter - -[threshold] -WLAN_USB = -200 ; signals weakers as the threshold won't be processed, -200 is all packets are processed. -BT_UART = -200 ; signals weakers as the threshold won't be processed, -200 is all packets are processed. - diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/license b/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/license deleted file mode 100644 index b331d2b..0000000 --- a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/license +++ /dev/null @@ -1 +0,0 @@ -#license here diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/serial-number b/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/serial-number deleted file mode 100644 index e69de29..0000000 diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/wlan_channels.conf b/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/wlan_channels.conf deleted file mode 100644 index 514c186..0000000 --- a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/config/wlan_channels.conf +++ /dev/null @@ -1,45 +0,0 @@ -0,1 -1,2 -2,3 -3,4 -4,5 -5,6 -6,44 -7,149 -8,7 -9,8 -10,9 -11,10 -12,11 -13,13 -14,6 -15,149 -16,44 -17,36 -18,40 -19,48 -20,52 -21,56 -22,60 -23,149 -24,6 -25,44 -26,13 -27,11 -28,10 -29,9 -30,8 -31,7 -32,149 -33,44 -34,6 -35,5 -36,4 -37,6 -38,2 -39,1 -40,64 -41,161 -42,165 -43,153 -44,157 diff --git a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/docker-compose.yml b/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/docker-compose.yml deleted file mode 100644 index 4976cb6..0000000 --- a/pi-gen/stage09-uas/00-install/files/docker-uas-sensor/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '2' - -services: - dronescout: - image: "docker.dronescout.co:5045/dronescout_arm64" #use dronescout_arm64 for ARM64 platforms - volumes: - - ./config:/config # folder with config files: dronescout.conf, wlan_channels.conf and license file - - ./config/serial-number:/sys/firmware/devicetree/base/serial-number - hostname: dronescout - restart: always - privileged: true - network_mode: "host" - mem_limit: 128m #optional, limit maximum memory usage to 128 Mbyte - mem_reservation: 32M #optional, in case of low memory on the host, limit memory usage to 32 Mbyte - cpus: 0.5 # optional guarantee at least 50% CPU time of one CPU core diff --git a/pi-gen/stage07-air/04-aryaair/files/89-skyaware.conf b/shared_files/air/89-skyaware.conf similarity index 100% rename from pi-gen/stage07-air/04-aryaair/files/89-skyaware.conf rename to shared_files/air/89-skyaware.conf diff --git a/pi-gen/stage07-air/01-files/files/blacklist-rtl-sdr.conf b/shared_files/air/blacklist-rtl-sdr.conf similarity index 100% rename from pi-gen/stage07-air/01-files/files/blacklist-rtl-sdr.conf rename to shared_files/air/blacklist-rtl-sdr.conf diff --git a/pi-gen/stage07-air/04-aryaair/files/dump1090-fa.service b/shared_files/air/dump1090-fa.service similarity index 86% rename from pi-gen/stage07-air/04-aryaair/files/dump1090-fa.service rename to shared_files/air/dump1090-fa.service index fcc6114..7451bec 100644 --- a/pi-gen/stage07-air/04-aryaair/files/dump1090-fa.service +++ b/shared_files/air/dump1090-fa.service @@ -1,11 +1,12 @@ -# AryaOS dump1090-fa.service -# dump1090-fa service for systemd +# dump1090-fa.service dump1090-fa service for systemd # # Copyright Sensors & Signals LLC https://www.snstac.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -14,7 +15,6 @@ # limitations under the License. # - [Unit] Description=dump1090-fa ADS-B receiver Documentation=https://flightaware.com/adsb/piaware/ diff --git a/pi-gen/stage07-air/04-aryaair/files/dump978-fa.service b/shared_files/air/dump978-fa.service similarity index 85% rename from pi-gen/stage07-air/04-aryaair/files/dump978-fa.service rename to shared_files/air/dump978-fa.service index 024cf38..bfd92ac 100644 --- a/pi-gen/stage07-air/04-aryaair/files/dump978-fa.service +++ b/shared_files/air/dump978-fa.service @@ -1,11 +1,12 @@ -# AryaOS dump978-fa.service -# dump978-fa service for systemd +# dump978-fa.service dump978-fa service for systemd # # Copyright Sensors & Signals LLC https://www.snstac.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pi-gen/stage07-air/01-files/files/flightaware-apt-repository_1.2_all.deb b/shared_files/air/flightaware-apt-repository_1.2_all.deb similarity index 100% rename from pi-gen/stage07-air/01-files/files/flightaware-apt-repository_1.2_all.deb rename to shared_files/air/flightaware-apt-repository_1.2_all.deb diff --git a/pi-gen/stage07-air/04-aryaair/files/readsb-config.txt b/shared_files/air/readsb-config.txt similarity index 86% rename from pi-gen/stage07-air/04-aryaair/files/readsb-config.txt rename to shared_files/air/readsb-config.txt index b9b313c..6207534 100644 --- a/pi-gen/stage07-air/04-aryaair/files/readsb-config.txt +++ b/shared_files/air/readsb-config.txt @@ -1,12 +1,12 @@ -# AryaOS readsb-config.txt -# -# readsb Env configuration file. +# readsb-config.txt readsb Env configuration file. # # Copyright Sensors & Signals LLC https://www.snstac.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pi-gen/stage07-air/04-aryaair/files/readsb-gain.sh b/shared_files/air/readsb-gain.sh similarity index 100% rename from pi-gen/stage07-air/04-aryaair/files/readsb-gain.sh rename to shared_files/air/readsb-gain.sh diff --git a/pi-gen/stage07-air/04-aryaair/files/readsb-install.sh b/shared_files/air/readsb-install.sh similarity index 100% rename from pi-gen/stage07-air/04-aryaair/files/readsb-install.sh rename to shared_files/air/readsb-install.sh diff --git a/pi-gen/stage07-air/04-aryaair/files/readsb-set-location.sh b/shared_files/air/readsb-set-location.sh similarity index 100% rename from pi-gen/stage07-air/04-aryaair/files/readsb-set-location.sh rename to shared_files/air/readsb-set-location.sh diff --git a/pi-gen/stage08-sea/00-install/files/aiscatcher.service b/shared_files/air/readsb.service similarity index 59% rename from pi-gen/stage08-sea/00-install/files/aiscatcher.service rename to shared_files/air/readsb.service index 24e060a..9493836 100644 --- a/pi-gen/stage08-sea/00-install/files/aiscatcher.service +++ b/shared_files/air/readsb.service @@ -1,12 +1,11 @@ -# AryaOS aiscatcher.service -# -# aiscatcher service for systemd -# +# readsb.service readsb service for systemd # Copyright Sensors & Signals LLC https://www.snstac.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -16,23 +15,25 @@ # [Unit] -Description=AIS-catcher +Description=readsb ADS-B receiver +Documentation=https://github.com/wiedehopf/readsb Wants=network.target After=network.target [Service] -User=aiscatcher -ExecStart=/usr/bin/AIS-catcher -RuntimeDirectory=aiscatcher -SyslogIdentifier=aiscatcher -EnvironmentFile=/etc/default/aiscatcher +# EnvironmentFile=/etc/default/readsb +User=readsb +RuntimeDirectoryMode=0755 +# Allows centralized aircraft.json: +RuntimeDirectory=adsb +ExecStart=/usr/local/sbin/run_readsb.sh +Type=simple Type=simple Restart=always -RestartSec=20 +RestartSec=15 StartLimitInterval=1 StartLimitBurst=100 -RestartPreventExitStatus=64 -Nice=-1 +Nice=-5 [Install] -WantedBy=default.target \ No newline at end of file +WantedBy=default.target diff --git a/pi-gen/stage07-air/04-aryaair/files/readsb_3.14.1621_arm64.deb b/shared_files/air/readsb_3.14.1621_arm64.deb similarity index 100% rename from pi-gen/stage07-air/04-aryaair/files/readsb_3.14.1621_arm64.deb rename to shared_files/air/readsb_3.14.1621_arm64.deb diff --git a/pi-gen/stage07-air/04-aryaair/files/run_readsb.sh b/shared_files/air/run_readsb.sh similarity index 58% rename from pi-gen/stage07-air/04-aryaair/files/run_readsb.sh rename to shared_files/air/run_readsb.sh index 19c84db..f5692f0 100755 --- a/pi-gen/stage07-air/04-aryaair/files/run_readsb.sh +++ b/shared_files/air/run_readsb.sh @@ -1,13 +1,13 @@ #!/bin/bash -# AryaOS run_readsb.sh -# -# Startup file for readsb. +# run_readsb.sh Startup file for readsb. # # Copyright Sensors & Signals LLC https://www.snstac.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -21,16 +21,18 @@ set -a AOS_CONFIG="/etc/aryaos-config.txt" READSB_CONFIG="/etc/default/readsb" -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG +if [ -f "${AOS_CONFIG}" ]; then + # shellcheck source=../aryaos/aryaos-config.txt + . "${AOS_CONFIG}" fi -if [ -f $READSB_CONFIG ]; then - . $READSB_CONFIG +if [ -f "${READSB_CONFIG}" ]; then + # shellcheck source=readsb-config.txt + . "${READSB_CONFIG}" fi set +a /usr/bin/readsb \ - $RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS \ - --write-json $ADSB_JSON --quiet \ No newline at end of file + "${RECEIVER_OPTIONS}" "${DECODER_OPTIONS}" "${NET_OPTIONS}" "${JSON_OPTIONS}" \ + --write-json "${ADSB_JSON}" --quiet \ No newline at end of file diff --git a/pi-gen/stage07-air/04-aryaair/files/tar1090-install.sh b/shared_files/air/tar1090-install.sh similarity index 100% rename from pi-gen/stage07-air/04-aryaair/files/tar1090-install.sh rename to shared_files/air/tar1090-install.sh diff --git a/pi-gen/stage08-sea/00-install/files/AIS-catcher_0.58.1_arm64.deb b/shared_files/sea/AIS-catcher_0.58.1_arm64.deb similarity index 100% rename from pi-gen/stage08-sea/00-install/files/AIS-catcher_0.58.1_arm64.deb rename to shared_files/sea/AIS-catcher_0.58.1_arm64.deb diff --git a/pi-gen/stage08-sea/00-install/files/ais-catcher.service b/shared_files/sea/ais-catcher copy.service similarity index 100% rename from pi-gen/stage08-sea/00-install/files/ais-catcher.service rename to shared_files/sea/ais-catcher copy.service diff --git a/pi-gen/stage08-sea/00-install/files/install-aiscatcher.sh b/shared_files/sea/install-aiscatcher.sh similarity index 100% rename from pi-gen/stage08-sea/00-install/files/install-aiscatcher.sh rename to shared_files/sea/install-aiscatcher.sh diff --git a/pi-gen/stage08-sea/00-install/files/install_dispatcher b/shared_files/sea/install_dispatcher similarity index 100% rename from pi-gen/stage08-sea/00-install/files/install_dispatcher rename to shared_files/sea/install_dispatcher diff --git a/pi-gen/stage08-sea/00-install/files/uart_control b/shared_files/sea/uart_control similarity index 100% rename from pi-gen/stage08-sea/00-install/files/uart_control rename to shared_files/sea/uart_control diff --git a/pi-gen/stage09-uas/00-install/files/AryaUAS.service b/shared_files/uas/AryaUAS.service similarity index 100% rename from pi-gen/stage09-uas/00-install/files/AryaUAS.service rename to shared_files/uas/AryaUAS.service diff --git a/pi-gen/stage09-uas/00-install/files/DroneCOT-config.txt b/shared_files/uas/DroneCOT-config.txt similarity index 100% rename from pi-gen/stage09-uas/00-install/files/DroneCOT-config.txt rename to shared_files/uas/DroneCOT-config.txt diff --git a/pi-gen/stage09-uas/00-install/files/DroneCOT.service b/shared_files/uas/DroneCOT.service similarity index 100% rename from pi-gen/stage09-uas/00-install/files/DroneCOT.service rename to shared_files/uas/DroneCOT.service diff --git a/pi-gen/stage09-uas/00-install/files/enable_AryaUAS.sh b/shared_files/uas/enable_AryaUAS.sh similarity index 100% rename from pi-gen/stage09-uas/00-install/files/enable_AryaUAS.sh rename to shared_files/uas/enable_AryaUAS.sh diff --git a/pi-gen/stage09-uas/00-install/files/run_DroneCOT.sh b/shared_files/uas/run_DroneCOT.sh similarity index 100% rename from pi-gen/stage09-uas/00-install/files/run_DroneCOT.sh rename to shared_files/uas/run_DroneCOT.sh