added current version of rc.local
This commit is contained in:
parent
1455c663c6
commit
e72fffb600
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash -e
|
||||
#
|
||||
# rc.local
|
||||
#
|
||||
# This script is executed at the end of each multiuser runlevel.
|
||||
# Make sure that the script will "exit 0" on success or any other
|
||||
# value on error.
|
||||
#
|
||||
# In order to enable or disable this script just change the execution
|
||||
# bits.
|
||||
#
|
||||
# By default this script does nothing.
|
||||
|
||||
# Print the IP address
|
||||
_IP=$(hostname -I) || true
|
||||
if [ "$_IP" ]; then
|
||||
printf "My IP address is %s\n" "$_IP"
|
||||
fi
|
||||
|
||||
sudo -u automation /home/automation/chch-power/run.sh
|
||||
|
||||
{
|
||||
while /bin/true;
|
||||
do
|
||||
AUTOSSH_FIRST_POLL=30 AUTOSSH_POLL=15 /usr/bin/autossh -N -M 20023 -4 -R '127.0.0.1:2322:127.0.0.1:22' automation@vbox.chch.it
|
||||
sleep 10
|
||||
done
|
||||
} &
|
||||
disown $!
|
||||
|
||||
{
|
||||
while /bin/true;
|
||||
do
|
||||
AUTOSSH_FIRST_POLL=30 AUTOSSH_POLL=15 /usr/bin/autossh -N -M 20025 -4 -R '127.0.0.1:2322:127.0.0.1:22' cloudbot@vcup.chch.it
|
||||
sleep 10
|
||||
done
|
||||
} &
|
||||
disown $!
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue