Bash script problem / query.
I am running scripts on a DD-WRT router. The first bash script mounts the USB partitions with other scripts, one of which is called to send an email using MSMTP to my gmail account. This works fine when I login after a reboot.
MSMTP requires .msmtprc to have its ownership set to current
user, e.g. chmod 600 .msmtprc. and it needs to be in the
current home directory.
When running the script to send an email my script copies
.msmtprc to ~/ (e.g. home) which appears to be '/' on bootup
but when I login it sets home to '/tmp/root'
I am unable to get the script to run automatically at startup
due to this issue I believe although it may be something else.
As I mentioned if I run from /tmp/root via normal login it works but using the script method on bootup it doesnt.
Anyone know how to resolve this. ?
Rob
|