Skip to content
Snippets Groups Projects
Commit 963f3027 authored by Aymeric Bernard's avatar Aymeric Bernard
Browse files

nfc-poll-wrapper to rerun each time

parent 15f0fe90
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
while :
do
res=$(nfc-poll | grep "UID " | cut -d: -f2 | sed 's/ //g' | xargs)
if [[ ! -z "$res" ]]
then
echo $res
sudo /hermod_bin/statusRGB.py 11ff11 -t 0.2 &
else
sudo /hermod_bin/statusRGB.py ff1111 -t 0.2 &
fi
sleep 1
done
const { spawn } = require('child_process');
const child = spawn('/bin/bash', ['-c', 'nfc-poll | grep "UID " | cut -d: -f2 | sed "s/ / /g"']);
const child = spawn('scripts/nfc-poll-wrapper.sh');
child.on('exit', (code, signal) => {
console.log(`child process exited with code ${code} and signal ${signal}`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment