Tag Info

Hot answers tagged

13

apt-get install sysv-rc-conf As others have pointed out, here is also update-rc.d for the cmd line. Run update-rc.d apache2 disable to disable apache2 from all run levels.


11

The "stop" term does not prevent the daemon from starting but rather shuts it down while entering the specified runlevel. If you just want to remove a service/daemon from a single runlevel, update-rc.d as pointed out bei freiheit or simply remove the symlink from /etc/rcX.d/, where X is your runlevel. If you don't want the service to start automatically, ...


5

Short: There is no reliable way to do this quickly. Long: Current Debian (Debian unstable as of 2012-06-01) has currently no reliable short way to consistently disable a service/daemon. – Because an upgrade of a daemon package unconditionally runs “/etc/init.d/package restart”, having it disabled for this runlevel or not. To make sure a daemon doesn’t ...


4

If you installed supervisord from the port sysutils/py-supervisor then this rc file is already present... (than to voretaq7 for pointing this out). The basic framework of a rc file is: #!/bin/sh . /etc/rc.subr name="supervisord" rcvar=`set_rcvar` load_rc_config "$name" command="/usr/local/bin/${name}" command_args="" run_rc_command "$1" Creating the ...


4

You could make a function to echo the message to both the screen and to syslog, something like this: LOGGER="/usr/bin/logger -t $myScript" # check the location of logger for your system myEcho () { echo "$1" $LOGGER "$1" } You could also put that into a separate file and include it into your scripts with #!/bin/bash myScript=$(basename $0) [ ...


4

Write a wrapper script that calls your script and redirects the output to a files #!/bin/bash /path/to/your/script &>/path/to/logfile


4

1.: No - they go to STDOUT (if you use echo) or STDERR (if you use echo >&2). 2.: Your scripts have to write to logs and/or syslog on their own (your distribution might contain some init.d-functions that might help there - add your Distribution to your question). If you go for logs look for the tee command. If you go for syslog look at logger. You ...


3

The problem you've stated is possibly related to difference in PATH of you when you execute script as logged-in user and when script is executed at startup. The output of 'which' depends on PATH. So if place where your executable resides is not on PATH, it will return nothing. I'd advice you to specify path to executable in $command explicitly. Or modify ...


3

Can you share your /etc/rc.conf and/or /etc/rc.conf.local? Perhaps there's something in there that you've set that's causing this. Also, try running it as "service mysql-server start" and see if the same thing happens?


2

rc startup order is determined by rcorder, as you've already determined. This process for determining startup order is automatic, and the man page for rcorder is relatively self-explanatory, but you may will want to spend some time reviewing Practical rc.d scripting, and the rc man page before making any changes. In your particular case, you can tell ...


2

If you installed supervisord from ports (sysutils/py-supervisor) you should have a functioning rc script in /usr/local/etc/rc.d/supervisord Check the script for info/other configuration parameters, but simply adding supervisord_enable="YES" to /etc/rc.conf should be all you need to do to make it start automatically on boot.


2

If you do not have backups, you could try installing rcconf and see if it will re-create the links. But in reality all Debian init files would have following information at the top of each script: ### BEGIN INIT INFO # Provides: inetd # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: $syslog # ...


2

I'm confused what you're trying to accomplish. What run levels do you want foo running in? If you always want it running, use update-rc.d foo defaults; that will stop it in 0, 1 and 6, while leaving it running in 2, 3, 4 and 5. (1 shouldn't run anything but a shell, 0 and 6 are halt and reboot) If you want to specify exactly what run levels to run in: ...


1

you should have your link named S99something, where S stands for starting, and 99 stands for the order in which the scripts in that directory are started. see the other link in that directory... Besides: you may want to rework the script to honour start / stop arguments, and add a K99something symlink to make sure the services are properly stop when leaving ...


1

Have you allready followed the steps listed on the opensuse web site? That should definitely work. There is a pretty good explanation at Cool Solutions as well


1

Have you tried adding a call to the script in your /etc/init.d/boot.local? Try it and see if that works better. There are several other boot.* files that are run at different parts of the startup.


1

After the rc.S, the init will run the rc.M if run level 2,3,4 or 5 and rc.K if run level 1... you can try to run in single (ie: runlevel 1) to see if it boots slackware 10.1 is old and might not be ready enough to run a 3.0 kernel... but you can try to debug it better, it might some missing feature on the kernel or some util that you needs update edit the ...


1

From my limited experience with SLES you put your local customizations in the right place. That being said, you did the Wrong Thing when you upgraded without first backing up your local settings -- the fact that the update also did a Wrong Thing by trashing that file on you notwithstanding, if you want to avoid being burned make sure you don your asbestos ...


1

Use rc variable command_args instead apps. RC treat command_args in certain way screening special symbols in it for evaluation.



Only top voted, non community-wiki answers of a minimum length are eligible