You've already forked Argon-One-Daemon
Inital Commit
All checks were successful
Argon One Daemon / Argon One Daemon [arm64] (push) Successful in 33s
All checks were successful
Argon One Daemon / Argon One Daemon [arm64] (push) Successful in 33s
This commit is contained in:
18
root/lib/systemd/system-shutdown/argon-one_poweroff.py
Normal file
18
root/lib/systemd/system-shutdown/argon-one_poweroff.py
Normal 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
|
||||
15
root/lib/systemd/system/argon-one.service
Normal file
15
root/lib/systemd/system/argon-one.service
Normal 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
|
||||
Reference in New Issue
Block a user