Update 34 files
- /nfc/README.md - /nfc/clean_old_logs.sh - /nfc/clockin.py - /nfc/emptycards.py - /nfc/sync_clocks.sh - /piservices/Dockerfile - /piservices/Portainer-lamp-stack.env - /piservices/Portainer-lamp-stack.yaml - /piservices/README.md - /piservices/avahi-alias.service - /piservices/clockpy.service - /piservices/emptycards.service - /piservices/nfc-sync.service - /piservices/test.sh - /www/404 - /www/get-table-data.php - /www/habiwan copy.png - /www/habiwan.png - /www/index.php - /www/log_swipe.php - /www/manage_data.php - /www/manifest.json - /www/names.csv - /www/network_audit.csv - /www/network-tracker.html - /www/nfc_debug.log - /www/scanner.html - /www/staff_names.php - /www/times.csv - /www/check_update.php - /www/dev.php - /www/favicon.png - /www/JsBarcode.all.min.js - /www/README.md
This commit is contained in:
1 parent
10824ab851
commit
a201d5d7ac
34 files changed
+9453
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Paths to the files we are watching
|
||||
TIMES_FILE="/home/YOURPIUSER/nfc/times.csv"
|
||||
NAMES_FILE="/home/YOURPIUSER/nfc/names.csv"
|
||||
|
||||
echo "Watching $TIMES_FILE and $NAMES_FILE for changes..."
|
||||
|
||||
# Loop indefinitely
|
||||
while inotifywait -e modify "$TIMES_FILE" "$NAMES_FILE"; do
|
||||
echo "Change detected! Copying files..."
|
||||
|
||||
# copy commands that happen after any swipe (or NFC-card name change):
|
||||
cp /home/YOURPIUSER/nfc/*.csv /media/NAS/PiClock/nfc/ # make sure you mount these 2 on your pi's /etc/fstab
|
||||
cp /home/YOURPIUSER/nfc/*.csv /media/uvm/ # see nfc/pifolder.md for more info
|
||||
|
||||
echo "Sync complete."
|
||||
done
|
||||
Reference in new issue
Block a user