Pilots of djb servers will use the daemontools svc utility as the central control command for all services running on their hosts.
Getting to know svc, and using it with as much ease and proficiency as ls or grep, is a key aptitude to acquire as quickly as possible. Here is a summary that may help while you are learning.
|svc -u||up||bring service up|
|svc -d||down||put service down (stays down)|
|svc -o||once||run service once (don't restart)|
|svc -x||exit||exit supervise after service is down|
|svc -a||alarm||SIGALRM||send service ALRM signal|
|svc -c||continue||SIGCONT||send service CONT signal|
|svc -h||"hup", hang-up||SIGHUP||send service HUP signal|
|svc -i||interrupt||SIGINT||send service INT signal|
|svc -k||kill||SIGKILL||send service KILL signal|
|svc -p||pause||SIGSTOP||send service STOP signal|
|svc -t||terminate||SIGTERM||send service TERM signal|
|svc -q||quit||SIGQUIT||send service QUIT signal|
|svc -1||user 1||SIGUSR1||send service USR1 signal|
|svc -2||user 2||SIGUSR2||send service USR2 signal|
For options that send signals, the actual behavior of the service will depend on how the application itself has been programmed to trap and react to each specific signal.
The default behavior of supervise is to re-start services if they should die. So, for example, sending a TERM or a KILL signal to a service will (usually) stop the application, after which supervise will then re-start it.
The default behavior of supervise may be changed for a service by placing a file named down in the service directory. If this file is present when supervise starts, the service will not be started automatically.
Manually run the qmail queue:
# svc -a /service/qmail-qsend
Reload the locals and virtualdomains control files used by qmail-send:
# svc -h /service/qmail-qsend
"Wake-up" a fetchmail service for an immediate poll:
# svc -1 /service/fetchmail
Toggle debug output on a mathopd service:
# svc -q /service/mathopd
Set a ppp service down by default, and run it once:
# touch /service/ppp/down # svc -o /service/ppp
Copyright © 2004 - 2007 Wayne Marshall.
All rights reserved.
Last edit 2007.12.27, wcm.