Remove build artifacts from repository and improve Debian package installation

- Remove debian/usr/bin/beast-dump from git tracking (build artifact)
- Add debian/usr/bin/* to .gitignore to prevent future binary commits
- Update postinst script for quiet installation:
  - Add --quiet flags to adduser/addgroup commands
  - Suppress output from directory creation and permission setting
  - Smart service handling: restart if enabled, leave disabled otherwise
  - Remove verbose installation messages
- Binaries are now built only during package creation, not stored in repo

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-24 18:46:37 +02:00
commit 721c1ca3a2
3 changed files with 18 additions and 24 deletions

4
.gitignore vendored
View file

@ -3,6 +3,10 @@ skyview
build/ build/
dist/ dist/
# Debian package build artifacts
debian/usr/bin/skyview
debian/usr/bin/beast-dump
# Configuration # Configuration
config.json config.json

View file

@ -5,44 +5,34 @@ case "$1" in
configure) configure)
# Create skyview user and group if they don't exist # Create skyview user and group if they don't exist
if ! getent group skyview >/dev/null 2>&1; then if ! getent group skyview >/dev/null 2>&1; then
addgroup --system skyview addgroup --system --quiet skyview
fi fi
if ! getent passwd skyview >/dev/null 2>&1; then if ! getent passwd skyview >/dev/null 2>&1; then
adduser --system --ingroup skyview --home /var/lib/skyview \ adduser --system --ingroup skyview --home /var/lib/skyview \
--no-create-home --disabled-password skyview --no-create-home --disabled-password --quiet skyview
fi fi
# Create directories with proper permissions # Create directories with proper permissions
mkdir -p /var/lib/skyview mkdir -p /var/lib/skyview /var/log/skyview >/dev/null 2>&1 || true
mkdir -p /var/log/skyview chown skyview:skyview /var/lib/skyview /var/log/skyview >/dev/null 2>&1 || true
chown skyview:skyview /var/lib/skyview chmod 755 /var/lib/skyview /var/log/skyview >/dev/null 2>&1 || true
chown skyview:skyview /var/log/skyview
chmod 755 /var/lib/skyview
chmod 755 /var/log/skyview
# Set permissions on config files # Set permissions on config files
if [ -f /etc/skyview/config.json ]; then if [ -f /etc/skyview/config.json ]; then
chown root:skyview /etc/skyview/config.json chown root:skyview /etc/skyview/config.json >/dev/null 2>&1 || true
chmod 640 /etc/skyview/config.json chmod 640 /etc/skyview/config.json >/dev/null 2>&1 || true
fi fi
# Install systemd service but do not enable or start it # Handle systemd service
systemctl daemon-reload systemctl daemon-reload >/dev/null 2>&1 || true
echo "SkyView has been installed successfully." # Check if service was previously enabled
echo "" if systemctl is-enabled skyview >/dev/null 2>&1; then
echo "Configuration:" # Service was enabled, restart it
echo " - Main config: /etc/skyview/config.json" systemctl restart skyview >/dev/null 2>&1 || true
echo "" fi
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"
;; ;;
esac esac

Binary file not shown.