Add get IP script
This commit is contained in:
parent
9240f6c523
commit
79c4da8bd0
3 changed files with 15 additions and 0 deletions
7
modules/rhizo_base/templates/get_ip.sh.erb
Executable file
7
modules/rhizo_base/templates/get_ip.sh.erb
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
_IP=`curl -s api.ipify.org`
|
||||
echo $_IP > /tmp/my_ip
|
||||
if [ "$_IP" == "<%= @protokol_pub_ip %>" ] ;then
|
||||
_IP=`curl -s 10.0.200.100/ip.sh`
|
||||
echo $_IP >> /tmp/my_ip
|
||||
fi
|
|
@ -79,6 +79,7 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
|
|||
|
||||
# It's a new day....
|
||||
30 5 * * * root /home/rhizomatica/bin/check_broken.sh
|
||||
31 5 * * * root /home/rhizomatica/bin/get_ip.sh
|
||||
|
||||
# Jobs to run on the BTS
|
||||
15 3 * * * root /var/SysmoBTS/maint.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue