Skip to content

Commit

Permalink
test for autostart with different routine to detect user
Browse files Browse the repository at this point in the history
  • Loading branch information
avollkopf committed Jul 2, 2024
1 parent 591f933 commit 6237098
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cbpi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "4.4.3.a1"
__version__ = "4.4.3.a2"
__codename__ = "Yeast Starter"

5 changes: 3 additions & 2 deletions cbpi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
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
Expand Down Expand Up @@ -165,7 +165,8 @@ def autostart(self, name):
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"
Expand Down

0 comments on commit 6237098

Please sign in to comment.