Display the splash screen when shutting down
- Also, turn the HDMI off after a short wait
This commit is contained in:
@@ -9,7 +9,7 @@ RUN apt update \
|
||||
&& apt install -y \
|
||||
build-essential git wget binfmt-support qemu gcc-9 \
|
||||
parted gcc-avr avr-libc avrdude python3 python3-pip python3-tornado \
|
||||
curl unzip python3-setuptools gcc-arm-linux-gnueabihf bc vim locate sudo \
|
||||
inetutils-ping curl unzip python3-setuptools gcc-arm-linux-gnueabihf bc vim locate sudo \
|
||||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
||||
&& apt install -y nodejs
|
||||
|
||||
15
installer/config/bbctrl-poweroff.service
Normal file
15
installer/config/bbctrl-poweroff.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Turn off HDMI at powerdown
|
||||
DefaultDependencies=no
|
||||
Before=umount.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c ' \
|
||||
killall xinit \
|
||||
&& plymouth change-mode --shutdown show-splash \
|
||||
&& sleep 10s \
|
||||
&& /usr/bin/vcgencmd display_power 0 '
|
||||
|
||||
[Install]
|
||||
WantedBy=poweroff.target
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bbctrl",
|
||||
"version": "1.0.10b12",
|
||||
"version": "1.0.10b15",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bbctrl",
|
||||
"version": "1.0.10b12",
|
||||
"version": "1.0.10b15",
|
||||
"hasInstallScript": true,
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bbctrl",
|
||||
"version": "1.0.10b12",
|
||||
"version": "1.0.10b15",
|
||||
"homepage": "https://onefinitycnc.com/",
|
||||
"repository": "https://github.com/OneFinityCNC/onefinity",
|
||||
"license": "GPL-3.0+",
|
||||
|
||||
@@ -156,6 +156,11 @@ if $UPDATE_PY; then
|
||||
service bbctrl restart
|
||||
fi
|
||||
|
||||
# Install the service that turns off the screen during shutdown
|
||||
cp ./installer/config/bbctrl-poweroff.service /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl enable bbctrl-poweroff
|
||||
|
||||
# Expand the file system if necessary
|
||||
chmod +x ./installer/scripts/resize_root_fs.sh
|
||||
./installer/scripts/resize_root_fs.sh
|
||||
|
||||
@@ -21,18 +21,12 @@ def call_get_output(cmd):
|
||||
class RebootHandler(bbctrl.APIHandler):
|
||||
|
||||
def put_ok(self):
|
||||
subprocess.Popen(['plymouth', 'show-splash'])
|
||||
subprocess.Popen(['plymouth', 'change-mode', '--shutdown'])
|
||||
subprocess.Popen(['killall', 'xinit'])
|
||||
subprocess.Popen(['reboot'])
|
||||
|
||||
|
||||
class ShutdownHandler(bbctrl.APIHandler):
|
||||
|
||||
def put_ok(self):
|
||||
subprocess.Popen(['plymouth', 'show-splash'])
|
||||
subprocess.Popen(['plymouth', 'change-mode', '--shutdown'])
|
||||
subprocess.Popen(['killall', 'xinit'])
|
||||
subprocess.Popen(['shutdown', '-h', 'now'])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user