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

View file

@ -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

Binary file not shown.