summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitignore5
-rw-r--r--Makefile6
-rw-r--r--catsit.8 (renamed from spawn.8)24
-rw-r--r--catsit.conf.5 (renamed from spawntab.5)10
-rw-r--r--catsit.sh (renamed from spawn.sh)10
-rw-r--r--catsitd.8 (renamed from spawnd.8)26
-rw-r--r--daemon.c4
7 files changed, 43 insertions, 42 deletions
diff --git a/.gitignore b/.gitignore
index ffd4582..3b0a7f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 *.o
+catsit
+catsit.conf
+catsitd
 config.mk
-spawn
-spawnd
 tags
diff --git a/Makefile b/Makefile
index 5cf0897..d0448ce 100644
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,9 @@ CFLAGS += -D'ETCDIR="${ETCDIR}"' -D'RUNDIR="${RUNDIR}"'
 
 -include config.mk
 
-BINS = spawn spawnd
+BINS = catsit catsitd
 MAN8 = ${BINS:=.8}
-MAN5 = spawntab.5
+MAN5 = catsit.conf.5
 
 OBJS += daemon.o
 OBJS += service.o
@@ -19,7 +19,7 @@ dev: tags all
 
 all: ${BINS}
 
-spawnd: ${OBJS}
+catsitd: ${OBJS}
 	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
 
 ${OBJS}: daemon.h
diff --git a/spawn.8 b/catsit.8
index f5ecc6c..d901359 100644
--- a/spawn.8
+++ b/catsit.8
@@ -1,10 +1,10 @@
-.Dd August 13, 2020
-.Dt SPAWN 8
+.Dd August 15, 2020
+.Dt CATSIT 8
 .Os
 .
 .Sh NAME
-.Nm spawn
-.Nd spawnd control
+.Nm catsit
+.Nd catsitd control
 .
 .Sh SYNOPSIS
 .Nm
@@ -17,7 +17,7 @@ The
 .Nm
 utility controls
 the services managed by the
-.Xr spawnd 8
+.Xr catsitd 8
 daemon.
 It does so by writing
 the remainder of its command line
@@ -25,7 +25,7 @@ to a named pipe.
 .
 .Pp
 Communication with
-.Xr spawnd 8
+.Xr catsitd 8
 is unidirectional.
 The daemon logs any feedback
 with syslog.
@@ -70,7 +70,7 @@ so they are not interpreted by the shell.
 .
 .Sh ENVIRONMENT
 .Bl -tag -width Ds
-.It Ev SPAWND_PIPE
+.It Ev CATSITD_PIPE
 The path of the named pipe.
 The
 .Fl c
@@ -79,19 +79,19 @@ flag overrides this variable.
 .
 .Sh FILES
 .Bl -tag -width Ds
-.It Pa /var/run/spawnd.pipe
+.It Pa /var/run/catsitd.pipe
 The default path of the named pipe.
 .El
 .
 .Sh EXAMPLES
 .Bd -literal
-spawn start pounce/freenode
-spawn status '*'
-spawn USR1 'pounce/*'
+catsit start pounce/freenode
+catsit status '*'
+catsit USR1 'pounce/*'
 .Ed
 .
 .Sh SEE ALSO
-.Xr spawnd 8
+.Xr catsitd 8
 .
 .Sh AUTHORS
 .An June Bug Aq Mt june@causal.agency
diff --git a/spawntab.5 b/catsit.conf.5
index 5819ff9..36fc463 100644
--- a/spawntab.5
+++ b/catsit.conf.5
@@ -1,16 +1,16 @@
 .Dd August 13, 2020
-.Dt SPAWNTAB 5
+.Dt CATSIT.CONF 5
 .Os
 .
 .Sh NAME
-.Nm spawntab
-.Nd spawnd services list
+.Nm catsit.conf
+.Nd catsitd services list
 .
 .Sh DESCRIPTION
 The
 .Nm
 file lists the services managed by the
-.Xr spawnd 8
+.Xr catsitd 8
 daemon.
 Leading whitespace is ignored.
 Each line of the file
@@ -65,7 +65,7 @@ pounce/tilde	$pounce $conf/tilde.conf
 .El
 .
 .Sh SEE ALSO
-.Xr spawnd 8
+.Xr catsitd 8
 .
 .Sh AUTHORS
 .An June Bug Aq Mt june@causal.agency
diff --git a/spawn.sh b/catsit.sh
index 052a7fd..bc18a46 100644
--- a/spawn.sh
+++ b/catsit.sh
@@ -6,18 +6,18 @@ die() {
 	exit 1
 }
 
-: ${SPAWND_PIPE:=/var/run/spawnd.pipe}
+: ${CATSITD_PIPE:=/var/run/catsitd.pipe}
 
 while getopts 'c:' opt; do
 	case "${opt}" in
-		(c) SPAWND_PIPE=$OPTARG;;
+		(c) CATSITD_PIPE=$OPTARG;;
 		(?) exit 1;;
 	esac
 done
 shift $((OPTIND - 1))
 
-if ! [ -p "${SPAWND_PIPE}" ]; then
-	die "${SPAWND_PIPE} is not a named pipe"
+if ! [ -p "${CATSITD_PIPE}" ]; then
+	die "${CATSITD_PIPE} is not a named pipe"
 fi
 
 [ $# -lt 1 ] && die 'action required'
@@ -31,4 +31,4 @@ if [ "${action}" != "${valid}" ]; then
 	die "${action} is not a valid action or signal"
 fi
 
-echo "$@" > "${SPAWND_PIPE}"
+echo "$@" > "${CATSITD_PIPE}"
diff --git a/spawnd.8 b/catsitd.8
index 1981304..cdb77a0 100644
--- a/spawnd.8
+++ b/catsitd.8
@@ -1,9 +1,9 @@
 .Dd August 13, 2020
-.Dt SPAWND 8
+.Dt CATSITD 8
 .Os
 .
 .Sh NAME
-.Nm spawnd
+.Nm catsitd
 .Nd process supervisor
 .
 .Sh SYNOPSIS
@@ -11,7 +11,7 @@
 .Op Fl d
 .Op Fl C Ar path
 .Op Fl c Ar control
-.Op Fl f Ar spawntab
+.Op Fl f Ar config
 .Op Fl g Ar group
 .Op Fl p Ar pidfile
 .Op Fl s Ar stopexits
@@ -50,14 +50,14 @@ Exponential backoff is applied to restarts.
 .
 .Pp
 The list of services is defined in a
-.Xr spawntab 5
+.Xr catsit.conf 5
 file.
 The services managed by
 .Nm
 can be controlled
 through a named pipe.
 The
-.Xr spawn 8
+.Xr catsit 8
 utility is a wrapper
 around the named pipe,
 and its manual page
@@ -80,9 +80,9 @@ used for control.
 .It Fl d
 Do not run as a daemon.
 .
-.It Fl f Ar spawntab
+.It Fl f Ar config
 Set the path of the
-.Xr spawntab 5
+.Xr catsit.conf 5
 file.
 .
 .It Fl g Ar group
@@ -136,7 +136,7 @@ daemon receives the
 .Dv HUP
 signal,
 the
-.Xr spawntab 5
+.Xr catsit.conf 5
 file is reloaded.
 Modified services
 are not automatically restarted,
@@ -180,18 +180,18 @@ in
 .
 .Sh FILES
 .Bl -tag -width Ds
-.It Pa /usr/local/etc/spawntab
+.It Pa /usr/local/etc/catsit.conf
 The default path of the
-.Xr spawntab 5
+.Xr catsit.conf 5
 file.
-.It Pa /var/run/spawnd.pipe
+.It Pa /var/run/catsitd.pipe
 The default path of the named pipe
 used for control.
 .El
 .
 .Sh SEE ALSO
-.Xr spawntab 5 ,
-.Xr spawn 8
+.Xr catsit.conf 5 ,
+.Xr catsit 8
 .
 .Sh AUTHORS
 .An June Bug Aq Mt june@causal.agency
diff --git a/daemon.c b/daemon.c
index 095e962..c873e8a 100644
--- a/daemon.c
+++ b/daemon.c
@@ -191,8 +191,8 @@ int main(int argc, char *argv[]) {
 	setAdd(&stopExits, EX_CONFIG);
 
 	const char *pidPath = NULL;
-	const char *configPath = ETCDIR "/spawntab";
-	const char *fifoPath = RUNDIR "/spawnd.pipe";
+	const char *configPath = ETCDIR "/catsit.conf";
+	const char *fifoPath = RUNDIR "/catsitd.pipe";
 
 	const char *userName = NULL;
 	const char *groupName = NULL;