You've already forked Geekwom-NASPi-Daemon
Initialize Git Repository: 'Geekwom-NASPi-Daemon'
All checks were successful
All checks were successful
This commit is contained in:
10
root/DEBIAN/control
Normal file
10
root/DEBIAN/control
Normal file
@@ -0,0 +1,10 @@
|
||||
Package: geekworm-naspi
|
||||
Version: 1.0.0
|
||||
Architecture:
|
||||
Installed-Size:
|
||||
Depends: bc, gpiod
|
||||
Priority: optional
|
||||
Section: mis
|
||||
Homepage: http://www.privlab.it
|
||||
Maintainer: PrivLab <repository@privlab.it>
|
||||
Description: Geekworm NASPi Daemon
|
||||
31
root/DEBIAN/postinst
Normal file
31
root/DEBIAN/postinst
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/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 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-helper unmask 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
fi
|
||||
if /usr/bin/deb-systemd-helper --quiet was-enabled ''; then
|
||||
/usr/bin/deb-systemd-helper enable 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-helper enable 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
else
|
||||
/usr/bin/deb-systemd-helper update-state 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-helper update-state 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
35
root/DEBIAN/postrm
Normal file
35
root/DEBIAN/postrm
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
|
||||
/usr/bin/test -n "${BOOT}"
|
||||
|
||||
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 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-helper unmask 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-helper purge 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-helper unmask 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
fi
|
||||
/usr/bin/sed --in-place --expression='/^\s*$/N; /## pwm-2chan/,/dtoverlay=pwm-2chan/d' "${BOOT}/config.txt"
|
||||
/usr/bin/echo ''
|
||||
/usr/bin/echo '################################################'
|
||||
/usr/bin/echo '# #'
|
||||
/usr/bin/echo '# ! Restart the device to unload the drivers ! #'
|
||||
/usr/bin/echo '# #'
|
||||
/usr/bin/echo '################################################'
|
||||
/usr/bin/echo ''
|
||||
;;
|
||||
esac
|
||||
25
root/DEBIAN/preinst
Normal file
25
root/DEBIAN/preinst
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
|
||||
/usr/bin/test -n "${BOOT}"
|
||||
|
||||
|
||||
case "${1}" in
|
||||
install)
|
||||
/usr/bin/echo '' >> "${BOOT}/config.txt"
|
||||
/usr/bin/echo '## pwm-2chan' >> "${BOOT}/config.txt"
|
||||
/usr/bin/echo '## Load the Pulse-Width Modulation driver.' >> "${BOOT}/config.txt"
|
||||
/usr/bin/echo '##' >> "${BOOT}/config.txt"
|
||||
/usr/bin/echo 'dtoverlay=pwm-2chan' >> "${BOOT}/config.txt"
|
||||
/usr/bin/echo ''
|
||||
/usr/bin/echo '########################################################'
|
||||
/usr/bin/echo '# #'
|
||||
/usr/bin/echo '# ! Restart the device to load the necessary drivers ! #'
|
||||
/usr/bin/echo '# #'
|
||||
/usr/bin/echo '########################################################'
|
||||
/usr/bin/echo ''
|
||||
;;
|
||||
esac
|
||||
19
root/DEBIAN/prerm
Normal file
19
root/DEBIAN/prerm
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/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 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-invoke disable 'geekworm-naspi-pwmd.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-invoke stop 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
/usr/bin/deb-systemd-invoke disable 'geekworm-naspi-button.service' > '/dev/null' 2>&1 || \
|
||||
/usr/bin/true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user