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

View File

@@ -0,0 +1,18 @@
#!/usr/bin/python3
import sys
import smbus
import RPi.GPIO as GPIO
rev = GPIO.RPI_REVISION
if rev == 2 or rev == 3:
bus = smbus.SMBus(1)
else:
bus = smbus.SMBus(0)
if len(sys.argv) > 1:
bus.write_byte(0x1A, 0)
if sys.argv[1] == "poweroff" or sys.argv[1] == "halt":
try:
bus.write_byte(0x1A, 0xFF)
except:
rev = 0

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Argon One Case Daemon
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/lib/argon-one/daemon
ProtectSystem=full
Restart=always
RestartSec=15
RestartPreventExitStatus=0
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target