Dienste aktivieren aber kein Autostart

mincer

Well-Known Member
Hy Leute

Lassen sich in der rc.conf Dienste aktivieren ohne das diese beim Starten des Systems automatisch gestartet werden?

Bsp:

apache2_enable="YES"

Sobald ich diese Zeile in rc.conf habe, wird der Apache-Webserver über /usr/local/etc/rc.d/apache2.sh automatisch beim Hochfahren gestartet.
Nun wäre es bar noch nett, wenn gewisse Dienste nur manuell über den entsprechenden Script gestartet werden könnten.

/usr/local/etc/rc.d/apache2.sh start

Oder muss ich halt einfach einen seperaten Script erstellen?

mInCEr
 
Hi mincer,

Du kannst die rc-Skripte auch ohne Eintrag in der r c.conf benutzen. Ergänze dazu einfach die commands um ein force, also
Code:
/usr/local/etc/rc.d/apache2.sh forcestart
/usr/local/etc/rc.d/apache2.sh forcestop

Gruß,

Ice
 
gabs da nicht - zumindest bei 5.x - die möglichkeit, bei startscripten in /usr/local/etc/rc.d einfach die endung .sh wegzulassen, dann wurden die dienste beim systemstart nicht berücksichtigt?
hj
 
RC(8)
Code:
[...]
[b]Contents of rc.d/[/b]
[...]
           foo.sh        Scripts that are to be sourced into the current shell
                         rather than a subshell have a .sh suffix.  Extreme
                         care must be taken in using this, as the startup
                         sequence will terminate if the script does.

           bar           Scripts that are sourced in a subshell.  These can
                         stop the boot if necessary with the following shell
                         commands:

                               if [ "$autoboot" = yes ]; then
                                       kill -TERM $$
                               fi
                               exit 1

                         Note that this should be used extremely sparingly!

[...]
     
     The following key points apply to old-style scripts in
     /usr/local/etc/rc.d/:

     o   Scripts are only executed if their basename(1) matches the shell
         globbing pattern *.sh, and they are executable.  Any other files or
         directories present within the directory are silently ignored.
[...]

Old-Style also...
 
Zurück
Oben