LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   start app as root at startup? (https://www.linuxquestions.org/questions/suse-opensuse-60/start-app-as-root-at-startup-705053/)

bjh 02-16-2009 08:44 AM

start app as root at startup?
 
I'd like to start an app called dualserver as root at suse 10.x startup.(Like running as a service in WinXP) How do I do that?

Thanks,

Brian H.
Uxbridge Ont

eco 02-16-2009 09:03 AM

Hi,

You should be able to do that by using the init script which should have been installed with the program in /etc/init.d or you could just add the command in /etc/rc.local if suse has one.

metrofox 02-16-2009 09:39 AM

Does your suse uses kde? If yes you can copy the executable file inside of .kde/autostart. I guess, but I don't know if you already use a root user. Bye.

bjh 02-16-2009 12:56 PM

Quote:

Does your suse uses kde? If yes you can copy the executable file inside of .kde/autostart. I guess, but I don't know if you already use a root user. Bye.
Thanks but I want it to run at system boot. The .kde/autostart seems to start it when the user logs on. No?

Quote:

You should be able to do that by using the init script which should have been installed with the program in /etc/init.d or you could just add the command in /etc/rc.local if suse has one.
I have tried this, and also have created a 2 line script that starts the app and put it into /etc/init.d . Owner is root and the file is executable. When I reboot however, the app does not start.

Code:

#!/bin/bash

/opt/dualserver/rc.dualserver start

Where am i going wrong?

Thanks,

Brian H.

eco 02-16-2009 01:27 PM

Quote:

I have tried this, and also have created a 2 line script that starts the app and put it into /etc/init.d . Owner is root and the file is executable. When I reboot however, the app does not start.
You can't just put the above script in /etc/init.d, you have to create links to in in the rcX.d directories to stop and start on different init levels. Have you done this?

bjh 02-16-2009 01:55 PM

Apparently there is more to this than I realized.
 
Quote:

you have to create links to in in the rcX.d directories to stop and start on different init levels. Have you done this?
No I haven't. How do I know which is the appropriate rcX.d to use?

Sorry new to Linux.

Thanks,

Brian H

eco 02-18-2009 06:24 AM

Hi,

Sorry for late reply.

this document might help understand init levels.


All times are GMT -5. The time now is 02:31 PM.