bash - Calling a script within a script that was run via nohup -


i have script, when run screen, works perfectly. directory structure follows:

/home/username/processing/scriptrunning /home/username/processing/functions/include_me 

in script, opens script, contains function doing this:

#!/bin/bash #this scriptrunning script . functions/include_me 

now when call script using following nohup command:

nohup /home/username/processing/scriptrunning

this output:

/home/username/processing/scriptrunning: line 3: /home/username/functions/include_me: no such file or directory 

it seems missing out processing directory

i've altered line within scriptrunning have full path, both hardcoded /home/username/processing , having variable created calling $(pwd), error same.

am missing stupid?

this isn't nohup issue. including source file using relative file name. try:

. $(dirname ${bash_source})/functions/include_me 

to include source file located relative ${bash_source}


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -