I have a rc.d script that fires up a program that normally looks for a configuration file in ~/.app/app.conf. However, when I use service app start (or when it is auto-started at startup), the app complains that it cannot find the conf file in /.app/app.conf (the root directory). Is there a way that I can setup the script so that the operating directory is ~/ - in this case ~/ = /root/Thanks.
How do I set the operating directory in a script in rc.d (FreeBSD)?
freebsd;rc