#!/bin/bash
scpu=`lshw -C cpu|grep serial|awk '{print $2}'`
macu=`ifconfig eth0|grep HWaddr|awk '{print $5}'`
mbs=`lshw|grep "configuration: uuid"|awk '{print $2}'`
echo $scpu $macu $mbs>/tmp/idu.key
md5sum /tmp/idu.key|awk '{print $1}'
#!/bin/bash
idu=`/scripts/idu.sh
wget --no-check-certificate -q -O /tmp/task.md 192.168.3.92/id_task.php$
echo "TASK `cat /tmp/task.md`"
task=`cat /tmp/task.md`
task1="11"
if [[ "$task1" < "$task" ]]
then
touch /opt/apps/tasks/`echo $task`
fi
#!/bin/bash
taskfile="/opt/apps/tasks/open_l2tp.tsk"
if [ -f $taskfile ]
then
echo "Open L2PT"
rm $taskfile
/etc/init.d/xl2tpd start
fi
#
NAME OP ID
term1 ( 41) 7d6f4f92f10a9b3bb3
term2 ( 32) 2b0fa075e3ca1b4ee9
ID TASK STAT
2b0fa075e3ca1b4ee9 open_l2tp.tsk is_done
7d6f4f92f10a9b3bb3 open_l2tp.tsk wait
<?
$ID = $_GET['ID'];
$dbcnx=@mysql_connect(localhost,base,*********);
mysql_select_db(TERM, $dbcnx);
$ath=mysql_query("select * from term_task where ID='$ID' and STATUS='wait';");
$term=mysql_fetch_array($ath);
$TASK=$term['TASK'];
$ath=mysql_query("UPDATE term_task SET STATUS='is done', DATA_S='$DATE' WHERE ID='$ID' and STATUS='wait';");
echo $TASK;
?>
Source: https://habr.com/ru/post/132726/