From 5bcf36ba3a91a703d203f70949af0eac50c13e77 Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Sat, 10 Feb 2024 01:39:09 +0000 Subject: [PATCH] Update manual, add rc.d stuff Signed-off-by: Izuru Yakumo git-svn-id: file:///srv/svn/repo/toyohime/trunk@114 922d331f-388e-da47-97a9-ad700dc0b8b9 --- rc.d/freebsd.sh | 26 ++++++++++++++++++++++++++ rc.d/immortal.yml | 2 ++ rc.d/netbsd.sh | 17 +++++++++++++++++ rc.d/openbsd.ksh | 11 +++++++++++ toyohime.1 | 4 +++- 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 rc.d/freebsd.sh create mode 100644 rc.d/immortal.yml create mode 100644 rc.d/netbsd.sh create mode 100644 rc.d/openbsd.ksh diff --git a/rc.d/freebsd.sh b/rc.d/freebsd.sh new file mode 100644 index 0000000..005a6e6 --- /dev/null +++ b/rc.d/freebsd.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# $TheSupernovaDuo$ +# +# PROVIDE: toyohime +# REQUIRE: DAEMON NETWORKING +# BEFORE: LOGIN +# KEYWORD: shutdown + +. /etc/rc.subr + +name="toyohime" +rcvar="${name}_enable" + +: ${toyohime_enable="NO"} +: ${toyohime_fqdn="localhost"} +: ${toyohime_user="www"} +: ${toyohime_group="www"} +: ${toyohime_repos="/usr/local/etc/toyohime-repos"} +: ${toyohime_address="127.0.0.1:8080"} + +command="/usr/sbin/daemon" +pidfile="/var/run/${name}.pid" +command_args="-p ${pidfile} -u ${toyohime_user} /usr/local/bin/${name} -listen ${toyohime_address} -index -watch ${toyohime_fqdn} ${toyohime_repos}" + +load_rc_config "${name}" +run_rc_command "$1" diff --git a/rc.d/immortal.yml b/rc.d/immortal.yml new file mode 100644 index 0000000..7e0008b --- /dev/null +++ b/rc.d/immortal.yml @@ -0,0 +1,2 @@ +cmd: /usr/local/bin/toyohime -listen 127.0.0.1:8080 -index go.example.com /usr/local/etc/toyohime-repos +user: www diff --git a/rc.d/netbsd.sh b/rc.d/netbsd.sh new file mode 100644 index 0000000..8c9cdd6 --- /dev/null +++ b/rc.d/netbsd.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# $TheSupernovaDuo$ +# +# PROVIDE: toyohime +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +$rc_subr_loaded . /etc/rc.subr + +name="toyohime" +rcvar="$name" +command="/usr/local/bin/$name" +command_args="-listen 127.0.0.1:8080 -index go.example.com /usr/local/etc/toyohime-repos" + +load_rc_config "$name" +run_rc_command "$1" diff --git a/rc.d/openbsd.ksh b/rc.d/openbsd.ksh new file mode 100644 index 0000000..5c56be0 --- /dev/null +++ b/rc.d/openbsd.ksh @@ -0,0 +1,11 @@ +#!/bin/ksh +# $TheSupernovaDuo$ + +. /etc/rc.d/rc.subr + +daemon="/usr/local/bin/toyohime" +daemon_flags="-listen 127.0.0.1:8080 -index localhost /etc/toyohime-repos" +daemon_user="www" +rc_bg=YES + +rc_cmd "$1" diff --git a/toyohime.1 b/toyohime.1 index 41d2e04..7ba383f 100644 --- a/toyohime.1 +++ b/toyohime.1 @@ -7,9 +7,11 @@ .Sh SYNOPSIS .Nm .Op Fl index -.Op Fl listen Ar :port +.Op Fl listen Ar ip:port .Op Fl nohealthz .Op Fl watch +.Op Ar fqdn +.Op Ar path/to/repos/file .Sh DESCRIPTION .Nm is a library and command line implementation