Inital Commit
All checks were successful
Argon One Daemon / Argon One Daemon [arm64] (push) Successful in 33s

This commit is contained in:
Cantibra
2025-10-26 21:11:04 +01:00
commit 02e0176f2f
15 changed files with 707 additions and 0 deletions

1
root/DEBIAN/conffiles Normal file
View File

@@ -0,0 +1 @@
/etc/argon-one.conf

10
root/DEBIAN/control Normal file
View File

@@ -0,0 +1,10 @@
Package: argon-one
Version: 1.0.0
Architecture:
Installed-Size:
Depends: python3, python3-rpi-lgpio, python3-smbus, raspi-gpio
Priority: optional
Section: misc
Homepage: http://www.privlab.it
Maintainer: PrivLab <hostmaster@privlab.it>
Description: Argon One Case Daemon

25
root/DEBIAN/postinst Normal file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
configure)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper unmask 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/deb-systemd-helper --quiet was-enabled 'argon-one.service'; then
/usr/bin/deb-systemd-helper enable 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
else
/usr/bin/deb-systemd-helper update-state 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac

23
root/DEBIAN/postrm Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
remove|purge)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper purge 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/sed --in-place 's/dtparam=i2c_arm=on/dtparam=i2c_arm=off/' "${BOOT}/config.txt"
/usr/bin/sed --in-place 's/console=tty0/console=tty0 console=ttyS1,115200/' "${BOOT}/cmdline.txt"
;;
esac

17
root/DEBIAN/preinst Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/sh
set -e
set -u
case "${1}" in
install)
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/sed --in-place 's/dtparam=i2c_arm=off/dtparam=i2c_arm=on/' "${BOOT}/config.txt"
/usr/bin/sed --in-place 's/ console=ttyS1,115200//' "${BOOT}/cmdline.txt"
/usr/bin/echo '##'
/usr/bin/echo '##'
/usr/bin/echo '## Restart the device to load the necessary drivers.'
/usr/bin/echo '##'
/usr/bin/echo '##'
;;
esac

15
root/DEBIAN/prerm Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/sh
set -e
set -u
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/deb-systemd-invoke stop 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-invoke disable 'argon-one.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac