mirror of
https://github.com/OpenSolo/OpenSolo.git
synced 2025-04-30 14:44:31 +02:00
15 lines
222 B
Python
15 lines
222 B
Python
|
|
import subprocess
|
|
|
|
STANDBY = 3
|
|
READY = 4
|
|
MAINTENANCE = 5
|
|
|
|
def set(level):
|
|
subprocess.check_output(["init", str(level)])
|
|
|
|
def get():
|
|
r = subprocess.check_output(["runlevel"])
|
|
r = r.split()
|
|
return int(r[1])
|