Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an application to be delivered as an RPM.
I don't know very good Linux.
What is best. Should the application start automatically on RPM installation or should the user manually start it from /etc/init.d?

share|improve this question
    
What kind of application is it and what kind of users will use it? –  Michael K Mar 30 '12 at 7:49
    
It is a tomcat and web apps in it.Users access it via web –  Jim Mar 30 '12 at 7:53
    
So, it seems to be made for at least semi-professional users, therefore I recommend /etc/init.d. –  Michael K Mar 30 '12 at 7:56

3 Answers 3

up vote 1 down vote accepted

Fedora has what is probably the best initscript policies, which covers your situation:

Why don't we....

  • run 'chkconfig <service> on'?

If a service should be enabled by default, make this the default in the init script. Doing otherwise will cause the service to be turned on on upgrades if the user explicitly disabled it.

Note that the default for most network-listening scripts is off. This is done for better security. We have multiple tools that can enable services, including GUIs.

  • start the service after installation?

Installations can be in changeroots, in an installer context, or in other situations where you don't want the services started.

share|improve this answer

You should add it to /etc/init.d, but make it also run as a service. Search google for tomcat service script

share|improve this answer

Be careful, "RPM based distribution" doesn't mean that a RPM built for one of them will work on another one of the set.

Note that Fedora now uses systemd, that changes how things are done. Look at the Fedora packaging guidelines.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.