I'm still trying to learn a little more about bash scripting and start-up / reboot, I have read about crontab @reboot and also just looking at other options but I just wondered if someone could maybe point me in the right direction before I find out there are limits on the method I am trying so on...
Here is what I am trying to accomplish:
I have 2 users that need to run processes on reboot / start-up:
User1: 5 Processes all run with standard privileges (No problems here)
User2: 2 Escalated commands (sudo) and 5 processes standard privileges to be run but only once mysql and the above processes are active.
I only have ssh access to the server so this is why I have opted from the info I have been reading to try the bash/cron method.
I have tested sudo command works with a bash script and seems to be good, all the accounts use keys rather than passwords so I do not get prompted to confirm the password, I've yet to test this on a reboot but will do very soon.
The main problem is checking if the 5 processes run by user1 have loaded before letting user2 start its work, with two separate bash scripts is it possible to create a wait or loop to check for running process names before continuing on?