README FOR ctlinetd 6.3 ----------------------- Have you ever wondered why there wasn't a simpler way to deal with inetd-managed services than going through the open, edit, close, HUP rigamarole? Well, now there is. ctlinetd is a control script for inetd and xinetd in the spirit of ctlinnd, apachectl, or rndc. ctlinetd lets you see and change the enabled/disabled status of individual (x)inetd-based services. You can also start, stop, and reload (x)inetd without hunting for a PID first, and easily disable all services with one command (useful when you're setting up a new machine). Unlike other solutions (service, chkconfig, Mac OS X GUI, etc.), ctlinetd is cross-platform, and supports traditional BSD inetd, xinetd, SMF-controlled inetd services on Solaris 10 and above, SRC-controlled inetd services on AIX, launchd-controlled xinetd services on Mac OS X 10.4 (Tiger) and above, and even rpc.inetd on DYNIX/ptx! INSTALLATION ------------ In the Makefile, set INST_DIR to wherever you want the software installed. You may also need to change the INSTALL command, depending on the location and version of "install" on your system. Then run "make install". USE --- When invoked with no arguments, ctlinetd prints out a usage statement listing each of the subcommands. Here it is: usage: ctlinetd help Prints this usage statement. ctlinetd version Prints version of ctlinetd. ctlinetd status [service...] Confirms that inetd is running, and reports its process ID. If services are specified, reports on enabled/disabled status. ctlinetd listenabled Reports on the status of all enabled services. ctlinetd reload Sends a signal to inetd to reload its configuration. ctlinetd restart Stops and starts inetd. ctlinetd start Starts inetd if it isn't running. ctlinetd stop Stops inetd. ctlinetd enable service Enables the service, and reloads the config if necessary. ctlinetd disable service Disables the service, and reloads the config if necessary. ctlinetd commentall Disables all services. With traditional inetd or xinetd, the config is not reloaded, which is useful for getting the config files into an initial secure state. With other mechanisms (e.g., SRC, SMF, launchd), services are disabled immediately. ctlinetd undo Replaces the config files with the backups, and reloads. USE WITH CAUTION. PLATFORMS --------- ctlinetd has been written for portability to most UNIX systems. It's been tested on the following platforms: - AIX - version 5.3 - Darwin/Mac OS X - versions 7.x/10.3.x through 8.x/10.4.x - DYNIX/ptx - HP-UX - versions 10.20 through 11.23 - Linux - Red Hat - Debian - Caldera OpenLinux - Solaris - versions 2.5.1 through 10 CHANGES ------- You're not required by the license to submit changes back to the source, but I'd appreciate portability improvements or enhancements of general applicability. You can email new versions or contextual diffs ("diff -c old_file new_file") to . Some things to keep in mind if you do this: - Formatting - I use tabs for indentation, and sometimes to align code segments for readability. Please do the same. - Please don't use NotePad or some other Windows editor to make changes. Or if you do, get rid of the DOS linefeeds before submitting changes. - Please try to follow the formatting conventions established in the existing code. - Readability - Usually, I will trade off efficiency (of running time or of development time) in favor of readability. - Insert meaningful comments where appropriate. - Portability - All shell scripts are Bourne-compatible. I won't use shell- specific constructs from bash, ksh, etc. - Don't use OS-specific features, pathnames, etc., unless they're guarded by code checking the OS version, or they're in user-settable variables toward the top of the script. CONTRIBUTORS ------------ Leon Towns-von Stauber Enjoy! Copyright (c) 1999-2007. All rights reserved. See the LICENSE file distributed with this code for restrictions on its use and further distribution. Original distribution available at .