I'm thankful for
Bob to have found the key command to request this, but as a command line newbie, I'm wondering if those of you who know better can give a hand to provide a tutorial to set up a cron job to keep MC running on my QNAP. Bob mentioned a few things that are required to be done first in order for this to run successfully. I've listed them out below, but I'm wondering how one would go about doing this. I'm sure this would be beneficial for others who have MC installed on their QNAP NAS.
Prerequisites:
1. How to obtain process ID of mediacenter22 via
pidof command?
2. How to find out if the X server is running on the QNAP, i.e. the user is logged in?
Setting up the script:
1. Command to see if the process ID of mediacenter22 exists;
2. If not running, then run the following command:
chroot /share/CACHEDEV1_DATA/.qpkg/HD_Station su - -c "export DISPLAY=:0 ; nohup mediacenter22&"
3. Configure script via cron or launchd command to run every 5 minutes, or user defined.
I only know about cron and launchd through apps like LingonX and Cronnix on the MacOS which are just GUI frontends for the command. I admit I should learn more about using the command line personally, but I'm having a hard time investing the necessary time right now.
Thanks again for the consideration!
-A