Rename project to catsit
This commit is contained in:
parent
449b0918ce
commit
6fb08baee3
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
*.o
|
*.o
|
||||||
|
catsit
|
||||||
|
catsit.conf
|
||||||
|
catsitd
|
||||||
config.mk
|
config.mk
|
||||||
spawn
|
|
||||||
spawnd
|
|
||||||
tags
|
tags
|
||||||
|
6
Makefile
6
Makefile
@ -8,9 +8,9 @@ CFLAGS += -D'ETCDIR="${ETCDIR}"' -D'RUNDIR="${RUNDIR}"'
|
|||||||
|
|
||||||
-include config.mk
|
-include config.mk
|
||||||
|
|
||||||
BINS = spawn spawnd
|
BINS = catsit catsitd
|
||||||
MAN8 = ${BINS:=.8}
|
MAN8 = ${BINS:=.8}
|
||||||
MAN5 = spawntab.5
|
MAN5 = catsit.conf.5
|
||||||
|
|
||||||
OBJS += daemon.o
|
OBJS += daemon.o
|
||||||
OBJS += service.o
|
OBJS += service.o
|
||||||
@ -19,7 +19,7 @@ dev: tags all
|
|||||||
|
|
||||||
all: ${BINS}
|
all: ${BINS}
|
||||||
|
|
||||||
spawnd: ${OBJS}
|
catsitd: ${OBJS}
|
||||||
${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
|
${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
|
||||||
|
|
||||||
${OBJS}: daemon.h
|
${OBJS}: daemon.h
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
.Dd August 13, 2020
|
.Dd August 15, 2020
|
||||||
.Dt SPAWN 8
|
.Dt CATSIT 8
|
||||||
.Os
|
.Os
|
||||||
.
|
.
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm spawn
|
.Nm catsit
|
||||||
.Nd spawnd control
|
.Nd catsitd control
|
||||||
.
|
.
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
@ -17,7 +17,7 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility controls
|
utility controls
|
||||||
the services managed by the
|
the services managed by the
|
||||||
.Xr spawnd 8
|
.Xr catsitd 8
|
||||||
daemon.
|
daemon.
|
||||||
It does so by writing
|
It does so by writing
|
||||||
the remainder of its command line
|
the remainder of its command line
|
||||||
@ -25,7 +25,7 @@ to a named pipe.
|
|||||||
.
|
.
|
||||||
.Pp
|
.Pp
|
||||||
Communication with
|
Communication with
|
||||||
.Xr spawnd 8
|
.Xr catsitd 8
|
||||||
is unidirectional.
|
is unidirectional.
|
||||||
The daemon logs any feedback
|
The daemon logs any feedback
|
||||||
with syslog.
|
with syslog.
|
||||||
@ -70,7 +70,7 @@ so they are not interpreted by the shell.
|
|||||||
.
|
.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Ev SPAWND_PIPE
|
.It Ev CATSITD_PIPE
|
||||||
The path of the named pipe.
|
The path of the named pipe.
|
||||||
The
|
The
|
||||||
.Fl c
|
.Fl c
|
||||||
@ -79,19 +79,19 @@ flag overrides this variable.
|
|||||||
.
|
.
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Pa /var/run/spawnd.pipe
|
.It Pa /var/run/catsitd.pipe
|
||||||
The default path of the named pipe.
|
The default path of the named pipe.
|
||||||
.El
|
.El
|
||||||
.
|
.
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
spawn start pounce/freenode
|
catsit start pounce/freenode
|
||||||
spawn status '*'
|
catsit status '*'
|
||||||
spawn USR1 'pounce/*'
|
catsit USR1 'pounce/*'
|
||||||
.Ed
|
.Ed
|
||||||
.
|
.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr spawnd 8
|
.Xr catsitd 8
|
||||||
.
|
.
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An June Bug Aq Mt june@causal.agency
|
.An June Bug Aq Mt june@causal.agency
|
@ -1,16 +1,16 @@
|
|||||||
.Dd August 13, 2020
|
.Dd August 13, 2020
|
||||||
.Dt SPAWNTAB 5
|
.Dt CATSIT.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.
|
.
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm spawntab
|
.Nm catsit.conf
|
||||||
.Nd spawnd services list
|
.Nd catsitd services list
|
||||||
.
|
.
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
file lists the services managed by the
|
file lists the services managed by the
|
||||||
.Xr spawnd 8
|
.Xr catsitd 8
|
||||||
daemon.
|
daemon.
|
||||||
Leading whitespace is ignored.
|
Leading whitespace is ignored.
|
||||||
Each line of the file
|
Each line of the file
|
||||||
@ -65,7 +65,7 @@ pounce/tilde $pounce $conf/tilde.conf
|
|||||||
.El
|
.El
|
||||||
.
|
.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr spawnd 8
|
.Xr catsitd 8
|
||||||
.
|
.
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An June Bug Aq Mt june@causal.agency
|
.An June Bug Aq Mt june@causal.agency
|
@ -6,18 +6,18 @@ die() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
: ${SPAWND_PIPE:=/var/run/spawnd.pipe}
|
: ${CATSITD_PIPE:=/var/run/catsitd.pipe}
|
||||||
|
|
||||||
while getopts 'c:' opt; do
|
while getopts 'c:' opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
(c) SPAWND_PIPE=$OPTARG;;
|
(c) CATSITD_PIPE=$OPTARG;;
|
||||||
(?) exit 1;;
|
(?) exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
if ! [ -p "${SPAWND_PIPE}" ]; then
|
if ! [ -p "${CATSITD_PIPE}" ]; then
|
||||||
die "${SPAWND_PIPE} is not a named pipe"
|
die "${CATSITD_PIPE} is not a named pipe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ $# -lt 1 ] && die 'action required'
|
[ $# -lt 1 ] && die 'action required'
|
||||||
@ -31,4 +31,4 @@ if [ "${action}" != "${valid}" ]; then
|
|||||||
die "${action} is not a valid action or signal"
|
die "${action} is not a valid action or signal"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$@" > "${SPAWND_PIPE}"
|
echo "$@" > "${CATSITD_PIPE}"
|
@ -1,9 +1,9 @@
|
|||||||
.Dd August 13, 2020
|
.Dd August 13, 2020
|
||||||
.Dt SPAWND 8
|
.Dt CATSITD 8
|
||||||
.Os
|
.Os
|
||||||
.
|
.
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm spawnd
|
.Nm catsitd
|
||||||
.Nd process supervisor
|
.Nd process supervisor
|
||||||
.
|
.
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
@ -11,7 +11,7 @@
|
|||||||
.Op Fl d
|
.Op Fl d
|
||||||
.Op Fl C Ar path
|
.Op Fl C Ar path
|
||||||
.Op Fl c Ar control
|
.Op Fl c Ar control
|
||||||
.Op Fl f Ar spawntab
|
.Op Fl f Ar config
|
||||||
.Op Fl g Ar group
|
.Op Fl g Ar group
|
||||||
.Op Fl p Ar pidfile
|
.Op Fl p Ar pidfile
|
||||||
.Op Fl s Ar stopexits
|
.Op Fl s Ar stopexits
|
||||||
@ -50,14 +50,14 @@ Exponential backoff is applied to restarts.
|
|||||||
.
|
.
|
||||||
.Pp
|
.Pp
|
||||||
The list of services is defined in a
|
The list of services is defined in a
|
||||||
.Xr spawntab 5
|
.Xr catsit.conf 5
|
||||||
file.
|
file.
|
||||||
The services managed by
|
The services managed by
|
||||||
.Nm
|
.Nm
|
||||||
can be controlled
|
can be controlled
|
||||||
through a named pipe.
|
through a named pipe.
|
||||||
The
|
The
|
||||||
.Xr spawn 8
|
.Xr catsit 8
|
||||||
utility is a wrapper
|
utility is a wrapper
|
||||||
around the named pipe,
|
around the named pipe,
|
||||||
and its manual page
|
and its manual page
|
||||||
@ -80,9 +80,9 @@ used for control.
|
|||||||
.It Fl d
|
.It Fl d
|
||||||
Do not run as a daemon.
|
Do not run as a daemon.
|
||||||
.
|
.
|
||||||
.It Fl f Ar spawntab
|
.It Fl f Ar config
|
||||||
Set the path of the
|
Set the path of the
|
||||||
.Xr spawntab 5
|
.Xr catsit.conf 5
|
||||||
file.
|
file.
|
||||||
.
|
.
|
||||||
.It Fl g Ar group
|
.It Fl g Ar group
|
||||||
@ -136,7 +136,7 @@ daemon receives the
|
|||||||
.Dv HUP
|
.Dv HUP
|
||||||
signal,
|
signal,
|
||||||
the
|
the
|
||||||
.Xr spawntab 5
|
.Xr catsit.conf 5
|
||||||
file is reloaded.
|
file is reloaded.
|
||||||
Modified services
|
Modified services
|
||||||
are not automatically restarted,
|
are not automatically restarted,
|
||||||
@ -180,18 +180,18 @@ in
|
|||||||
.
|
.
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Pa /usr/local/etc/spawntab
|
.It Pa /usr/local/etc/catsit.conf
|
||||||
The default path of the
|
The default path of the
|
||||||
.Xr spawntab 5
|
.Xr catsit.conf 5
|
||||||
file.
|
file.
|
||||||
.It Pa /var/run/spawnd.pipe
|
.It Pa /var/run/catsitd.pipe
|
||||||
The default path of the named pipe
|
The default path of the named pipe
|
||||||
used for control.
|
used for control.
|
||||||
.El
|
.El
|
||||||
.
|
.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr spawntab 5 ,
|
.Xr catsit.conf 5 ,
|
||||||
.Xr spawn 8
|
.Xr catsit 8
|
||||||
.
|
.
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An June Bug Aq Mt june@causal.agency
|
.An June Bug Aq Mt june@causal.agency
|
4
daemon.c
4
daemon.c
@ -191,8 +191,8 @@ int main(int argc, char *argv[]) {
|
|||||||
setAdd(&stopExits, EX_CONFIG);
|
setAdd(&stopExits, EX_CONFIG);
|
||||||
|
|
||||||
const char *pidPath = NULL;
|
const char *pidPath = NULL;
|
||||||
const char *configPath = ETCDIR "/spawntab";
|
const char *configPath = ETCDIR "/catsit.conf";
|
||||||
const char *fifoPath = RUNDIR "/spawnd.pipe";
|
const char *fifoPath = RUNDIR "/catsitd.pipe";
|
||||||
|
|
||||||
const char *userName = NULL;
|
const char *userName = NULL;
|
||||||
const char *groupName = NULL;
|
const char *groupName = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user