diff --git a/.gitignore b/.gitignore index a1bd4d4..902c831 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ skyview build/ dist/ +# Debian package build artifacts +debian/usr/bin/skyview +debian/usr/bin/beast-dump + # Configuration config.json diff --git a/debian/DEBIAN/postinst b/debian/DEBIAN/postinst index 5e9f8d8..c99d832 100755 --- a/debian/DEBIAN/postinst +++ b/debian/DEBIAN/postinst @@ -5,44 +5,34 @@ case "$1" in configure) # Create skyview user and group if they don't exist if ! getent group skyview >/dev/null 2>&1; then - addgroup --system skyview + addgroup --system --quiet skyview fi if ! getent passwd skyview >/dev/null 2>&1; then adduser --system --ingroup skyview --home /var/lib/skyview \ - --no-create-home --disabled-password skyview + --no-create-home --disabled-password --quiet skyview fi # Create directories with proper permissions - mkdir -p /var/lib/skyview - mkdir -p /var/log/skyview - chown skyview:skyview /var/lib/skyview - chown skyview:skyview /var/log/skyview - chmod 755 /var/lib/skyview - chmod 755 /var/log/skyview + mkdir -p /var/lib/skyview /var/log/skyview >/dev/null 2>&1 || true + chown skyview:skyview /var/lib/skyview /var/log/skyview >/dev/null 2>&1 || true + chmod 755 /var/lib/skyview /var/log/skyview >/dev/null 2>&1 || true # Set permissions on config files if [ -f /etc/skyview/config.json ]; then - chown root:skyview /etc/skyview/config.json - chmod 640 /etc/skyview/config.json + chown root:skyview /etc/skyview/config.json >/dev/null 2>&1 || true + chmod 640 /etc/skyview/config.json >/dev/null 2>&1 || true fi - # Install systemd service but do not enable or start it - systemctl daemon-reload + # Handle systemd service + systemctl daemon-reload >/dev/null 2>&1 || true - echo "SkyView has been installed successfully." - echo "" - echo "Configuration:" - echo " - Main config: /etc/skyview/config.json" - echo "" - echo "To start SkyView:" - echo " sudo systemctl enable skyview" - echo " sudo systemctl start skyview" - echo "" - echo "Binaries installed:" - echo " - skyview: Main ADS-B tracker server" - echo " - beast-dump: Beast protocol data dump utility" + # Check if service was previously enabled + if systemctl is-enabled skyview >/dev/null 2>&1; then + # Service was enabled, restart it + systemctl restart skyview >/dev/null 2>&1 || true + fi ;; esac diff --git a/debian/usr/bin/beast-dump b/debian/usr/bin/beast-dump deleted file mode 100755 index 525d911..0000000 Binary files a/debian/usr/bin/beast-dump and /dev/null differ