My current setup consists of Ubuntu VPS 14.04 x64 Bit. I've got two users; 'root' and 'mcmyadmin'. I'm trying to automatically run the McMyAdmin software every time my VPS reboots.
This is the command, and I'm attempting to run it from the user 'mcmyadmin' at startup:
cd ~/McMyAdmin; screen ./MCMA2_Linux_x86_64
I've got this reflected in the /etc/rc.local file, which I've seen from other SE threads, should cause this command to be run after boot has finished.
This is my /etc/rc.local file:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. cd ~/McMyAdmin; screen ./MCMA2_Linux_x86_64 exit 0
I've tried changing the owner of this file with
chown, so 'root' is the owner, but this didn't make any difference; whenever I reboot my server it doesn't run this command.
If you could provide any insight into what's going wrong here, that would be greatly appreciated!