Since the update of the System on my Synology NAS (x86) i have some problems with my startup scripts.
The Bash scripts are stored in /usr/local/etc/rc.d. The scripts were executed for sure, because i have a Server running on root and its starting without any problems.
But my other server executables doesn't start properly if i put them in the "su" command to start it with another user.
The commands that are executed in the scripts are following:
su admin -c /volume1/homes/admin/subsonic/subsonic.sh
the bash script is running without any problems, but the script starts java with the specific commands and there it can't find the path of java.
su admin -c "screen -dmS ncdc ncdc"
on this line the problem is that the system can't find screens path. If i start it without su so that it will be running as root, then it will work.
if i start the command with a minus, then i also get this behaviour
root@schreda-NAS:~ # su - admin -c "screen -dmS test test"
-bash: screen: command not found
the path value will be set by /etc/profile. I don't override the path on ~/.bash_profile