vigil

Security camera system built on motion and yolov7.
Log | Files | Refs

commit a99583067a8ecd0c6d4b7c0bfcd42b8be57f3427
parent 8024b1df13c793af2810afeb86f8467d85f6681b
Author: dwrz <dwrz@dwrz.net>
Date:   Thu,  2 Feb 2023 14:46:35 +0000

Refactor setup script

Diffstat:
Msetup | 19++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/setup b/setup @@ -12,7 +12,7 @@ readonly FILES=( B2_BUCKET="my-bucket-name" CAMERA_NAME="Kitchen" -DOMAIN="kitchen.example.com" +DOMAIN="${HOSTNAME}" EMAIL_HOST="smtp.gmail.com" EMAIL_PORT="587" EMAIL_USER="user@example.com" @@ -135,6 +135,15 @@ write_settings() { done } +link_files() { + ln -s "./config/motion.conf" "/etc/motion/motion.conf" + ln -s "./config/msmtprc" "${MOTION_DIR}/.msmtprc" + ln -s "./config/muttrc" "${MOTION_DIR}/.muttrc" + ln -s "./scripts/alert" "${MOTION_DIR}/alert" + ln -s "./scripts/notify" "${MOTION_DIR}/notify" + ln -s "./scripts/sync" "${MOTION_DIR}/sync" +} + main() { input_settings @@ -147,6 +156,14 @@ main() { no ) exit 0 ;; esac done + + echo "Link files?" + select yn in "yes" "no"; do + case "${yn}" in + yes ) link_files && exit 0 ;; + no ) exit 0 ;; + esac + done } main "$@"