Missed howdy command linking and disabled pop cache
This commit is contained in:
parent
e5a3cf3241
commit
8d3a4736cb
3 changed files with 21 additions and 6 deletions
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
python3 /lib/security/howdy/cli.py
|
||||
13
debian/postinst
vendored
13
debian/postinst
vendored
|
|
@ -31,7 +31,7 @@ if user is None:
|
|||
log("Upgrading pip to the latest version")
|
||||
|
||||
# Update pip
|
||||
handleStatus(subprocess.call(["pip3 install --upgrade pip"], shell=True))
|
||||
handleStatus(subprocess.call(["pip3 install --upgrade pip --no-cache-dir"], shell=True))
|
||||
|
||||
log("Starting camera check")
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ handleStatus(subprocess.call(["rm", "-rf", "/tmp/dlib_clone"]))
|
|||
log("Installing face_recognition")
|
||||
|
||||
# Install face_recognition though pip
|
||||
handleStatus(subprocess.call(["pip3", "install", "face_recognition"]))
|
||||
handleStatus(subprocess.call(["pip3", "install", "face_recognition", "--no-cache-dir"]))
|
||||
|
||||
log("Copying howdy data")
|
||||
|
||||
|
|
@ -122,6 +122,15 @@ for line in fileinput.input(["/lib/security/howdy/config.ini"], inplace = 1):
|
|||
# Secure the howdy folder
|
||||
handleStatus(subprocess.call(["chmod 600 -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))
|
||||
|
||||
# Make the CLI executable as howdy
|
||||
handleStatus(subprocess.call(["ln -s /lib/security/howdy/cli.py /usr/local/bin/howdy"], shell=True))
|
||||
handleStatus(subprocess.call(["chmod +x /usr/local/bin/howdy"], shell=True))
|
||||
|
||||
# Install the command autocomplete, don't error on failure
|
||||
# subprocess.call(["sudo cp /lib/security/howdy/autocomplete.sh /etc/bash_completion.d/howdy"], shell=True)
|
||||
|
||||
|
|
|
|||
12
debian/prerm
vendored
12
debian/prerm
vendored
|
|
@ -6,11 +6,19 @@
|
|||
import subprocess
|
||||
|
||||
# Remove files and symlinks
|
||||
subprocess.call(["rm -rf /lib/security/howdy/"], shell=True)
|
||||
try:
|
||||
subprocess.call(["rm -rf /lib/security/howdy/"], shell=True)
|
||||
except as e:
|
||||
pass
|
||||
try:
|
||||
subprocess.call(["rm /usr/share/bash-completion/completions/howdy"], shell=True)
|
||||
except as e:
|
||||
pass
|
||||
|
||||
subprocess.call(["rm /usr/bin/howdy"], shell=True)
|
||||
|
||||
# Remove face_recognition and dlib
|
||||
subprocess.call(["pip3 uninstall face_recognition dlib -y"], shell=True)
|
||||
subprocess.call(["pip3 uninstall face_recognition dlib -y --no-cache-dir"], shell=True)
|
||||
|
||||
# Print a tearbending message
|
||||
print("""
|
||||
|
|
|
|||
Loading…
Reference in a new issue