diff --git a/.travis.yml b/.travis.yml index 4e168e6..01542b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,8 @@ script: - 'sudo howdy | ack-grep --passthru --color "current active user: travis"' - echo "import face_recognition; print(face_recognition.__version__);" > /tmp/h.py - - python3 /tmp/h.py + - sudo /usr/bin/env python3 /tmp/h.py + - sudo howdy test # Remove howdy from the installation - sudo apt purge howdy -y diff --git a/debian/postinst b/debian/postinst index 6db89a5..dffcc5d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -53,6 +53,7 @@ if not os.path.exists("/tmp/howdy_picked_device"): # Go through every setting in the old config and apply it to the new file for section in oldConf.sections(): for (key, value) in oldConf.items(section): + # If config is still using the old device_id parameter, convert it to a path if key == "device_id": key = "device_path" value = "/dev/video" + value @@ -124,12 +125,12 @@ for line in fileinput.input(["/lib/security/howdy/config.ini"], inplace = 1): print("Camera ID saved") # Secure the howdy folder -handleStatus(subprocess.call(["chmod 600 -R /lib/security/howdy/"], shell=True)) +handleStatus(subprocess.call(["chmod 744 -R /lib/security/howdy/"], shell=True)) # Allow anyone to execute the python CLI handleStatus(subprocess.call(["chmod 755 /lib/security/howdy"], shell=True)) -handleStatus(subprocess.call(["chmod 744 /lib/security/howdy/cli.py"], shell=True)) -handleStatus(subprocess.call(["chmod 744 -R /lib/security/howdy/cli"], shell=True)) +handleStatus(subprocess.call(["chmod 755 /lib/security/howdy/cli.py"], shell=True)) +handleStatus(subprocess.call(["chmod 755 -R /lib/security/howdy/cli"], shell=True)) print("Permissions set") # Make the CLI executable as howdy