Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### nano /home/pi/nfcmillionaire/grabcard.sh
- #!/bin/bash
- outfolder="/var/www/html/files"
- execfile="/home/pi/nfcmillionaire/readcc"
- while true; do
- outfile=$(date +%Y-%m-%d_%H-%M-%S)".txt"
- $execfile > $outfolder/$outfile
- num_of_lines=$(wc -l < "$outfolder/$outfile")
- echo $num_of_lines
- if [[ $num_of_lines -gt 3 ]]; then
- echo "Got it"
- else
- rm "$outfolder/$outfile"
- fi
- done
- #### sudo nano /lib/systemd/system/grabcard.service
- [Unit]
- Description=Get credit card info automatically from NFC
- [Service]
- #User=pi
- ExecStart=/home/pi/nfcmillionaire/grabcard.sh
- Type=simple
- [Install]
- WantedBy=default.target
- Alias=grabcard.service
Advertisement
Add Comment
Please, Sign In to add comment