summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattthew Weger2024-05-17 22:16:05 +0000
committerMattthew Weger2024-05-17 22:16:05 +0000
commitdd7661e0365ae3fb59b6e0e253be5beff0876d85 (patch)
tree918abea6424568859be78a4db76a2022a570b472
parent6cfd8837029b5bccd73f382b286adbd07fc419c2 (diff)
downloadaur-dd7661e0365ae3fb59b6e0e253be5beff0876d85.tar.gz
fixed some permission issues
-rwxr-xr-xauto_facelock.py1
-rwxr-xr-xauto_facelock_enroll.py1
-rw-r--r--setup.install7
3 files changed, 4 insertions, 5 deletions
diff --git a/auto_facelock.py b/auto_facelock.py
index 233e1e09a5fc..9d5dba890c74 100755
--- a/auto_facelock.py
+++ b/auto_facelock.py
@@ -28,7 +28,6 @@ def load_known_faces(known_faces_dir):
known_names.append(os.path.splitext(filename)[0])
else:
logger.warning(f"No face found in {filename}, deleting file.")
- os.remove(image_path)
logger.info(f"Loaded {len(known_faces)} known face(s) from {known_faces_dir}")
return known_faces, known_names
diff --git a/auto_facelock_enroll.py b/auto_facelock_enroll.py
index a621b2018ff6..1487cb6c0253 100755
--- a/auto_facelock_enroll.py
+++ b/auto_facelock_enroll.py
@@ -112,7 +112,6 @@ def main(num_captures):
for _ in range(num_captures):
image = capture_image()
if image is not None:
- save_image_with_increment(temp_dir, 'captured_image.jpg', image)
filtered_image, face_box = filter_background(image)
if filtered_image is not None:
filename = save_image_with_increment(temp_dir, 'filtered_image.jpg', filtered_image)
diff --git a/setup.install b/setup.install
index f5ca8e625ce8..4bd6ddb6ee85 100644
--- a/setup.install
+++ b/setup.install
@@ -1,11 +1,12 @@
post_install() {
- username=$(whoami)
echo "Thank you for installing auto_facelock."
echo
echo "To enroll your face, run:"
echo " sudo auto_facelock_enroll.py"
echo
echo "To enable and start the service, run:"
- echo " sudo systemctl enable auto_facelock@${username}.service"
- echo " sudo systemctl start auto_facelock@${username}.service"
+ echo " sudo systemctl enable auto_facelock@\$(whoami).service"
+ echo " sudo systemctl start auto_facelock@\$(whoami).service"
+ echo
+ echo "Note: If you are running these commands as a different user, replace \$(whoami) with your actual username."
}