Tag Info

Hot answers tagged

4

According to this Linux Mint Community document, chkconfig works but does kick out errors. You should review the documentation on using upstart as I believe Linux Mint is moving to this method for controlling system services.


4

The hyphen (-) found in an init script: #!/bin/sh # # chkconfig: - 24 73 means that the service should not be started in any run levels by default, only stopped. It replaces a list of run levels (e.g. 345) as shown below: #!/bin/sh # # chkconfig: 345 24 73 Therefore if you use: chkconfig --add <script> then no start links will be created in ...


4

from man page: By default, the on and off options affect only runlevels 2, 3, 4, and 5, while reset and resetpriorities affects all of the runlevels. The --level option may be used to specify which runlevels are affected. so you can use awk to extract only those levels(2,3,4,5): chkconfig --list | grep httpd | awk '{ print $4 }' | cut -d ':' ...


4

Try the Fedora 17 method... systemctl enable sshd.service


3

I would think that this warning is harmless (assuming you have not been hacked or you haven't installed any suspicious packages), it seems that rkhunter thinks that scripts in /sbin are suspicious behaviour. In fact, checked on a clean Ubuntu install I have here and chkconfig is indeed a script.


3

From the fedora wiki page about systemd: Does chkconfig command work with systemd? Yes, for turning on/off services, compatibility has been provided both ways. chkconfig has been modified to call systemctl when dealing with systemd service files. Also systemctl automatically calls chkconfig when dealing with a traditional sysv init file. ...


2

Since it is an ubuntu based distro you can also use update-rc.d. update-rc.d rsync remove or install rcconf wich is a really nice text-based user interface


2

You can debug an issue like this by running the start script in a more verbose manner. $ bash -x service policyserver start You might want to capture this output to a log file too. $ bash -x service policyserver start |& tee policyserver_startup.log You can then go through the log file and see which command is failing.


2

You could always just do it yourself. For example, add this to your ~/.bashrc (easy enough to modify for other shells): alias chkconfig="chkconfig | perl -pe 'use Term::ANSIColor; s/\bon\b/color(\"green\").on.color(\"reset\")/ige;'" If you want to be able to pass arguments to chkconfig use a function instead: function chkconfig(){ /sbin/chkconfig $* | ...


2

From /etc/rc?.d/README: To disable a service in this runlevel, rename its script in this directory so that the new name begins with a 'K' and a two-digit number, and run 'update-rc.d script defaults' to reorder the scripts according to dependencies. Files starting with S are started, and those with K are killed if running prior to the runlevel ...


2

Idea #1 Try putting a -x at the top of the service script, this will put the shell into debug mode so that you'll get any output that's being generated by the script. #!/bin/sh -x Idea #2 Also you might want to add the process name to the top of the chkconfig comment macros as well. # processname: vtigervm You may need to change this value to ...


1

chkconfig actually just places symlinks to the services init-scripts usually found in /etc/init.d. So instead of grepping und awk'ing the output of chkconfig you can just check the existence of the symlink. When I do a chkconfig httpd on, it creates a link called /etc/rc3.d/S85httpd, pointing to init.d. chkconfig httpd off removes that link (and does more, ...


1

chkconfig is a Red Hat feature/command so that doesn't surprise me that it doesn't work for you on Ubuntu. You can start cron using the services command instead. $ sudo services crond start Example $ sudo service cron start cron start/running, process 20209 This will run it for the duration that the box is up. To make this service start as part of a ...


1

Your script has to touch /var/lock/subsys/... to indicate it's running. Look at the atd or crond init scripts as an example, and /etc/rc for how it's actually parsed. (Note: I'm looking at /etc/rc for Fedora) # First, run the KILL scripts. for i in /etc/rc$runlevel.d/K* ; do # Check if the subsystem is already up. ...


1

Given you control the init.d script to start this process you might want to just wrap the execution of your process in the init.d script like so: until myserver; do echo "Server 'myserver' crashed with exit code $?. Respawning.." >&2 sleep 1 done This will lanch your process in an until loop basically forever, each time it dies. Counting ...


1

I can't verify, but if chkconfig(8) is to be believed, you have a syntax error on your #chkconfig: line. Apparently, it should be: # chkconfig: 06 1 1 for a start and stop priority of both 1 in runlevels 0 and 6. Running chkconfig --list killfoo should tell you whether the script will actually be executed when entering/exiting the relevant runlevels. ...


1

It is important to understand what the command does in order to use the equivalent on a different system. Here is the description of "defaults" in the update-rc.d manpage: If defaults is used then update-rc.d will make links to start the ser vice in runlevels 2345 and to stop the service in runlevels 016. In order to replicate this in chkconfig, ...



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