This question is so simple, I’m almost embarrassed to ask. After installing a few DroboApps, I noticed that they don’t always install binaries in places where the PATH environment variable can find them (for instance, apachectl is not accessible by default). I decided to create a drop-dead simple “App” called “bin” - and all it does is add its own directory to the PATH. That way I have a home for binaries and other things without polluting the root filesystem. Simple, right?
Sadly, the service doesn’t seem to work (I based it on the simple Dropbear service). OpenSSH handles this perfectly (thanks Ricardo!), so I know it’s perfectly doable. If I export the variable manually it works like a charm, so it seems something is just wrong with this file.
By the way, if there is a “Right Way” to do this that I’m missing, by all means correct me.
Set up personal customizations
dirname \realpath $0``
name=“bin” # service name
version=“0.1” # program version
case “$1” in
echo “Usage: $0 [start|stop|restart|status]”