Can someone explain me why my script can't be run from other directory than this one where it is created? My script start.sh in directory /root/etlegacy/ :
#!/bin/bash
/usr/bin/screen -d -m -S etserver /root/etlegacy/etlded
Everything works fine when I am in /root/etlegacy/and run script through:
./start.sh
But It is not working when I am elsewhere in the file system, even If I am using full path to script i.e
/root/etlegacy/start.sh
cd /root/etlegacy && exec /usr/bin/screen -d -m -S etserver /root/etlegacy/etlded, or whatnot.