diff --git a/Makefile b/Makefile index cd5d3e5..a770608 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ FLAGS = PLATFORM=$(PLATFORM) PWD=$(PWD) PREFIX=$(PREFIX) .PHONY: all clean ./Mokou ./Control -all: ./Mokou ./Control +all: ./Mokou ./Control ./Manpage/mokouctl.8 ./Mokou:: $(MAKE) -C $@ $(FLAGS) @@ -15,6 +15,10 @@ all: ./Mokou ./Control ./Control:: $(MAKE) -C $@ $(FLAGS) +./Manpage/mokouctl.8: ./Manpage/mokouctl.8.tmp + sed "s%@PREFIX@%$(PREFIX)%g" ./Manpage/mokouctl.8.tmp > $@ + clean: $(MAKE) -C ./Mokou $(FLAGS) clean $(MAKE) -C ./Control $(FLAGS) clean + rm -f ./Manpage/mokouctl.8 diff --git a/Manpage/mokou.8 b/Manpage/mokou.8 new file mode 100644 index 0000000..b88fe16 --- /dev/null +++ b/Manpage/mokou.8 @@ -0,0 +1,13 @@ +.Dd $Mdocdate$ +.Dt MOKOU 8 +.Os +.Sh NAME +.Nm mokou +.Nd Keeps your services alive +.Sh SYNOPSIS +.Nm +.Sh AUTHORS +.An nishi Aq Mt nishi@nishi.boats +.Pp +This manual page has been written by +.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja diff --git a/Manpage/mokou.conf.5 b/Manpage/mokou.conf.5 new file mode 100644 index 0000000..f16cb62 --- /dev/null +++ b/Manpage/mokou.conf.5 @@ -0,0 +1,27 @@ +.Dd $Mdocdate$ +.Dt MOKOU.CONF 5 +.Os +.Sh NAME +.Nm mokou.conf +.Nd INI-like format for +.Xr mokouctl 8 +services +.Sh DESCRIPTION +.Bl -tag +.It exec +Command to execute, argv0 must be a full path to the executable +.It pidfile +Where to store the process ID +.It user +Run this command as another user +.It stop +Use #TERM to send a signal to the process, else, +a full path to the executable (such as +.Xr pkill 1) +to stop the service +.El +.Sh AUTHORS +.An nishi Aq Mt nishi@nishi.boats +.Pp +This manual page has been written by +.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja diff --git a/Manpage/mokouctl.8.tmp b/Manpage/mokouctl.8.tmp new file mode 100644 index 0000000..77bf436 --- /dev/null +++ b/Manpage/mokouctl.8.tmp @@ -0,0 +1,26 @@ +.Dd $Mdocdate$ +.Dt MOKOUCTL 8 +.Os +.Sh NAME +.Nm mokouctl +.Nd Control services started by Mokou +.Sh SYNOPSIS +.Nm +.Op reload +.Op start Ar service +.Op stop Ar service +.Sh DESCRIPTION +.Bl -tag +.It reload +Reload the service directory +(by default @PREFIX@/etc/mokou) +.It start Ar service +Start the service. +.It stop Ar service +Stop the service by sending a TERM signal +.El +.Sh AUTHORS +.An nishi Aq Mt nishi@nishi.boats +.Pp +This manual page has been written by +.An Izuru Yakumo