snakeware

Python-based Linux distro for x86-64 and RPi
git clone git://squid-tech.com/snakeware.git
Log | Files | Refs | README

commit 095bb421d4daa8570228660dd046e8ff62cf8d93
parent c119876831619411531a1322a278b19ec570a80b
Author: Josh Moore <jxm5210@g.rit.edu>
Date:   Thu, 18 Jun 2020 18:43:52 -0400

Merge pull request #129 from karx1/master

Add shutdown and reboot commands
Diffstat:
Msnakeware/external/overlay/usr/share/snakeware/startup.py | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/snakeware/external/overlay/usr/share/snakeware/startup.py b/snakeware/external/overlay/usr/share/snakeware/startup.py @@ -17,4 +17,18 @@ class SnakeWMCommand(Command): return SnakeWM().run() +class ShutdownCommand(Command): + def run(self): + import os + os.system("/sbin/poweroff -f") + + +class RebootCommand(Command): + def run(self): + import os + os.system("/sbin/reboot -f") + + snakewm = SnakeWMCommand() +shutdown = ShutdownCommand() +reboot = RebootCommand()