<hostname-or-ipv4>:<port>
Given a port without a host (e.g. C<-l :42217>) the daemon will listen
-on that port on all network interfaces.
+on that port on all network interfaces. Use C<-L> to avoid the need
+to explicitly provide the port if the default port is desired.
If no B<-l> option is not specified the default address,
C<unix:/tmp/rrdcached.sock>, will be used.
Multiple B<-l> options may be provided.
+=item B<-L>
+
+Tells the daemon to bind to the default TCP port on all available
+interfaces. It is equivalent to C<-l ''> without the confusion of the
+empty string parameter.
+
=item B<-s> I<group_name>|I<gid>
Set the group permissions of a UNIX domain socket. The option accepts either
#SOCKMODE=0660
# Network socket address requests. Use in conjunction with SOCKFILE to
-# also listen on INET domain sockets. (The option is a lower-case ell
-# ASCII 108 = 0x6c, and should be repeated for each address.).
-NETWORK_OPTIONS="-l :42217"
+# also listen on INET domain sockets. The option is a lower-case ell
+# ASCII 108 = 0x6c, and should be repeated for each address. The
+# parameter is an optional IP address, followed by an optional port with
+# a colon separating it from the address. The empty string is
+# interpreted as "open sockets on the default port on all available
+# interfaces", but generally does not pass through init script functions
+# so use -L with no parameters for that configuration.
+#NETWORK_OPTIONS="-L"
# Any other options not specifically supported by the script (-P, -f,
# -F, -B).
-BASE_OPTIONS=-B
+BASE_OPTIONS="-B"
default_socket.socket_group = (gid_t)-1;
default_socket.socket_permissions = (mode_t)-1;
- while ((option = getopt(argc, argv, "Ogl:s:m:P:f:w:z:t:BRb:p:Fj:a:h?")) != -1)
+ while ((option = getopt(argc, argv, "OgLl:s:m:P:f:w:z:t:BRb:p:Fj:a:h?")) != -1)
{
switch (option)
{
stay_foreground=1;
break;
+ case 'L':
case 'l':
{
listen_socket_t *new;
}
memset(new, 0, sizeof(listen_socket_t));
- strncpy(new->addr, optarg, sizeof(new->addr)-1);
+ if ('L' == option)
+ new->addr[0] = 0;
+ else
+ strncpy(new->addr, optarg, sizeof(new->addr)-1);
/* Add permissions to the socket {{{ */
if (default_socket.permissions != 0)