mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-03 12:14:18 +01:00
test for autostart with different routine to detect user
This commit is contained in:
parent
591f933db0
commit
62370980e0
2 changed files with 4 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
|||
__version__ = "4.4.3.a1"
|
||||
__version__ = "4.4.3.a2"
|
||||
__codename__ = "Yeast Starter"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ from cbpi.configFolder import ConfigFolder
|
|||
from cbpi.utils.utils import load_config
|
||||
from zipfile import ZipFile
|
||||
from cbpi.craftbeerpi import CraftBeerPi
|
||||
import os
|
||||
import os, pwd
|
||||
import pkgutil
|
||||
import shutil
|
||||
import click
|
||||
|
@ -165,7 +165,8 @@ class CraftBeerPiCli():
|
|||
else:
|
||||
print("CraftBeerPi Autostart is {}OFF{}".format(Fore.RED,Style.RESET_ALL))
|
||||
elif(name == "on"):
|
||||
user=os.getlogin()
|
||||
#user=os.getlogin()
|
||||
user=pwd.getpwuid(os.getuid()).pw_name
|
||||
path="/usr/local/bin/cbpi"
|
||||
if os.path.exists("/home/"+user+"/.local/bin/cbpi") is True:
|
||||
path="/home/"+user+"/.local/bin/cbpi"
|
||||
|
|
Loading…
Reference in a new issue