aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/pies.c4
-rw-r--r--src/piesctl.c42
3 files changed, 21 insertions, 29 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 982bd12..9fb29d2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,3 @@
# This file is part of GNU Pies.
-# Copyright (C) 2008-2013 Sergey Poznyakoff
+# Copyright (C) 2008-2016 Sergey Poznyakoff
#
@@ -53,3 +53,3 @@ incdir=$(pkgdatadir)/$(VERSION)/include
inc_DATA = pp-setup
-EXTRA_DIST = cmdline.opt pp-setup inetd.in
+EXTRA_DIST = cmdline.opt piesctl-cl.opt pp-setup inetd.in
diff --git a/src/pies.c b/src/pies.c
index bbbc367..e7c1a22 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -1939,3 +1939,3 @@ request_restart_components (size_t cc, char **cv)
argv[3 + i] = NULL;
- execv (argv[0], argv);
+ execvp (argv[0], argv);
logmsg (LOG_ERR, "can't run piesctl: %s", strerror (errno));
@@ -1954,3 +1954,3 @@ list_components (void)
argv[4] = NULL;
- execv (argv[0], argv);
+ execvp (argv[0], argv);
logmsg (LOG_ERR, "can't run piesctl: %s", strerror (errno));
diff --git a/src/piesctl.c b/src/piesctl.c
index 626463c..b979c09 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -179,32 +179,24 @@ parse_config ()
{
- if (strcmp (instance, "pies") == 0)
+ if (verbose)
+ printf ("%s: falling back to default URL\n", program_name);
+ if (default_url)
+ url = default_url;
+ else
{
- if (verbose)
- printf ("%s: falling back to default URL\n", program_name);
- if (default_url)
- url = default_url;
- else
+ int rc;
+ size_t len = 0;
+ file_name = NULL;
+ grecs_asprintf (&file_name, &len, DEFAULT_CONTROL_URL, instance);
+ rc = pies_url_create (&url, file_name);
+ free (file_name);
+
+ if (rc)
{
- int rc;
- size_t len = 0;
- file_name = NULL;
- grecs_asprintf (&file_name, &len, DEFAULT_CONTROL_URL, instance);
- rc = pies_url_create (&url, file_name);
- free (file_name);
-
- if (rc)
- {
- grecs_error (NULL, 0, _("%s: cannot create URL: %s"),
- DEFAULT_CONTROL_URL, strerror (errno));
- exit (EX_SOFTWARE);
- }
+ grecs_error (NULL, 0, _("%s: cannot create URL: %s"),
+ DEFAULT_CONTROL_URL, strerror (errno));
+ exit (EX_SOFTWARE);
}
}
- else
- {
- grecs_error (NULL, 0, _("socket name for instance %s not configured"),
- instance);
- exit (EX_CONFIG);
- }
}
+
if (verbose)

Return to:

Send suggestions and report system problems to the System administrator.