Tag Info

Hot answers tagged

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

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

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


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

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.


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 ...


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

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

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. ...



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