Not workingnano /etc/rc.local
Before the exit put your command with 'screen -d -m' before it. If you don't wish to run as root then su - <user> -c "screen -d -m command" &
Then exit and restart server to check.
#!/bin/sh -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.
screen -d -m ./1.sh
exit 0
Your need to put the full location of the script and not ./
,Ashley
#!/bin/sh -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.
screen -d -m /root/1.sh
exit 0
my sh script.Just create a new /etc/init.d/ script and launch it from there.
Forget about /etc//rc.local
#!/bin/bash
tcptunnel --local-port=22 --remote-port=4722 --remote-host=95.128.47.39 --bind-address=23.94.62.8 --stay-alive & tcptunnel --local-port=80 --remote-port=4723 --remote-host=95.128.47.39 --bind-address=23.94.62.8 --stay-alive & tcptunnel --local-port=22 --remote-port=5522 --remote-host=95.128.47.39 --bind-address=23.94.62.7 --stay-alive & tcptunnel --local-port=80 --remote-port=5524 --remote-host=95.128.47.39 --bind-address=23.94.62.7 --stay-alive
Where is the screen command?my sh script.
#!/bin/bash
tcptunnel --local-port=22 --remote-port=4722 --remote-host=95.128.47.39 --bind-address=23.94.62.8 --stay-alive & tcptunnel --local-port=80 --remote-port=4723 --remote-host=95.128.47.39 --bind-address=23.94.62.8 --stay-alive & tcptunnel --local-port=22 --remote-port=5522 --remote-host=95.128.47.39 --bind-address=23.94.62.7 --stay-alive & tcptunnel --local-port=80 --remote-port=5524 --remote-host=95.128.47.39 --bind-address=23.94.62.7 --stay-alive
what error log is it in?@OP can you elaborate on what "doesn't work" means? Are you seeing errors in your logs? Did it do nothing? Is it giving you a path issue?
Strange nothing in the logs for this #strangeDepends on what you're running. Check /var/log/messages or /var/log/syslog or /var/log/daemon or something of that sort.