Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- NAME="python /opt/voda/testtm.py"; [ -z "$(ps ax | grep "$NAME" | grep -v "grep")" ] && echo "процесс умер" || echo "процесс запущен"
- foo() {
- if [ -f /sys/devices/w1_bus_master1/w1_master_slaves ]; then
- while read line; do
- temp=$(grep "t=" /sys/devices/w1_bus_master1/$line/w1_slave| sed 's/^.*t=//')
- echo -n "$line_$temp "
- done < "/sys/devices/w1_bus_master1/w1_master_slaves"
- else
- echo "нет файла"
- fi
- }
- NAME="python /opt/voda/testtm.py"; [ -z "$(ps ax | grep "$NAME" | grep -v "grep")" ] && mon=1 || mon=0
- data=$(foo | sed's/ $//;s/ /,/')
- curl http://testsite.ru/w.php?mon=$mon&data=$data
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement