mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 00:18:17 +01:00
test for bookworm -> staring cbpi w/o sudo install with pipx
This commit is contained in:
parent
72ea6ac2d7
commit
252c2d171b
2 changed files with 7 additions and 8 deletions
|
@ -44,8 +44,8 @@ class CraftBeerPiCli():
|
|||
|
||||
def list_one_wire(self):
|
||||
print("List 1Wire")
|
||||
call(["modprobe", "w1-gpio"])
|
||||
call(["modprobe", "w1-therm"])
|
||||
call(["sudo","modprobe", "w1-gpio"])
|
||||
call(["sudo","modprobe", "w1-therm"])
|
||||
try:
|
||||
for dirname in os.listdir('/sys/bus/w1/devices'):
|
||||
if (dirname.startswith("28") or dirname.startswith("10")):
|
||||
|
@ -155,7 +155,7 @@ class CraftBeerPiCli():
|
|||
if os.path.exists(os.path.join("/etc/systemd/system","craftbeerpi.service")) is False:
|
||||
srcfile = self.config.get_file_path("craftbeerpi.service")
|
||||
destfile = os.path.join("/etc/systemd/system")
|
||||
shutil.copy(srcfile, destfile)
|
||||
shutil.os.system('sudo cp "{}" "{}"'.format(srcfile,destfile))
|
||||
print("Copied craftbeerpi.service to /etc/systemd/system")
|
||||
os.system('systemctl enable craftbeerpi.service')
|
||||
print('Enabled craftbeerpi service')
|
||||
|
@ -180,7 +180,7 @@ class CraftBeerPiCli():
|
|||
print('craftbeerpi.service service is not running')
|
||||
|
||||
if os.path.exists(os.path.join("/etc/systemd/system","craftbeerpi.service")) is True:
|
||||
os.remove(os.path.join("/etc/systemd/system","craftbeerpi.service"))
|
||||
shutil.os.system('sudo rm -rf "{}"'.format(os.path.join("/etc/systemd/system","craftbeerpi.service")))
|
||||
print("Deleted craftbeerpi.service from /etc/systemd/system")
|
||||
else:
|
||||
print("craftbeerpi.service is not located in /etc/systemd/system")
|
||||
|
@ -189,7 +189,6 @@ class CraftBeerPiCli():
|
|||
return
|
||||
return
|
||||
|
||||
|
||||
def chromium(self, name):
|
||||
'''Enable or disable autostart'''
|
||||
if(name == "status"):
|
||||
|
|
|
@ -170,7 +170,7 @@ def setup(cbpi):
|
|||
cbpi.plugin.register("OneWire", OneWire)
|
||||
try:
|
||||
# Global Init
|
||||
call(["modprobe", "w1-gpio"])
|
||||
call(["modprobe", "w1-therm"])
|
||||
call(["sudo","modprobe", "w1-gpio"])
|
||||
call(["sudo","modprobe", "w1-therm"])
|
||||
except Exception as e:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue