Thanks for a great script... one thing I noticed is that I was having some issues getting the -r parameter to work. When CumulusMX tried to restart after stopping, I would get some "invalid path" errors in the screen session. Putting "cd $INSTPATH" prior to the screen command (similar to how it is in the main section) appears to solve the issue.
This is on Ubuntu Server, perhaps it was losing track of the install path. Figured I would mention it in case others run across the same problem.
I can not reproduce this error on my Raspberry (Debian) regardless from which folder I call the script, because the next line in this Script after the "cd $INSTPATH" is:
screen -dmS $SERVICE -amds bash mono $INSTPATH/CumulusMX.exe -port 9999
So "screen" does not need a path, "mono" also does not need a path and I am calling CumulusMX with the path at the beginning. I have no Idea, why I need to be in the installation folder first.
btw: I have also no Idea, why I did this in the Main part of my Program but....if a simple cd $INSTPATH solves your problem, I added this to my Script and once the next verison will be released, this line will be in there. I really appreciate all your suggestions and comments regarding this Script.
At my work (Technical Support in a large IT Company), I need to work with Linux (especially Suse Enterprise 11) Servers and this scripting exercise will help me much to learn all these things
Next on my Agenda for this Script will be: With this Script I force everybody to accept to run cumulus on port 9999 (without changing the script) I want to change the script to accept a second Parameter ($2) as a Port. If no second Parameter, the default 9999 will be used. "sudo ./cumulusmx.sh -r 8080" for example. this should be possible