init III
This commit is contained in:
18
Perl Ubiquiti mpower steuerung/device control/create_cron.sh
Normal file
18
Perl Ubiquiti mpower steuerung/device control/create_cron.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
export USER="andre"
|
||||
export PASS="mesh-assort2"
|
||||
export HOST="power.andregeissler.de"
|
||||
export DEVICE="Test"
|
||||
|
||||
rm /scripts/mFi/cron
|
||||
curl -s http://$USER:$PASS@$HOST/$DEVICE/timer > /scripts/mFi/cron_input
|
||||
dos2unix /scripts/mFi/cron_input > /dev/null 2>&1
|
||||
cat /scripts/mFi/cron_input | egrep "^ct" | awk '{print $2 " " $3 " " $4 " " $5 " " $6 " root /scripts/mFi/switch_port.sh " $7 " " $8 " >/dev/null 2>&1"}' >> /scripts/mFi/cron
|
||||
rm /scripts/mFi/cron_input
|
||||
|
||||
#export CRON=`cat /scripts/mFi/cron`
|
||||
|
||||
#sed -s -i "/####mFi####.*####mFi####/####mFi\n$CRON\n####mFi####/m" /var/spool/cron/crontabs/root
|
||||
|
||||
|
||||
Reference in New Issue
Block a user