diff options
Diffstat (limited to 'www/pocket-id/files')
-rw-r--r-- | www/pocket-id/files/pkg-message.in | 17 | ||||
-rw-r--r-- | www/pocket-id/files/pocket-id.in | 36 |
2 files changed, 53 insertions, 0 deletions
diff --git a/www/pocket-id/files/pkg-message.in b/www/pocket-id/files/pkg-message.in new file mode 100644 index 000000000000..f97cc825952b --- /dev/null +++ b/www/pocket-id/files/pkg-message.in @@ -0,0 +1,17 @@ +[ +{ type: install + message: <<EOM +Pocket ID is installed + +1) Configure it in %%PREFIX%%/etc/pocket-id.env + +2) Enable it with + + sysrc pocket_id_enable=YES + +3) Start it with + + service pocket-id start +EOM +} +] diff --git a/www/pocket-id/files/pocket-id.in b/www/pocket-id/files/pocket-id.in new file mode 100644 index 000000000000..04a26a82a74e --- /dev/null +++ b/www/pocket-id/files/pocket-id.in @@ -0,0 +1,36 @@ +#!/bin/sh + +# PROVIDE: pocket_id +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Configuration settings for pocket-id in /etc/rc.conf +# +# pocket_id_enable (bool): Enable pocket-id. (Default=NO) +# pocket_id_env_file (str): Path containing the environment variables +# to be used by pocket-id. (Default: /usr/local/etc/pocket-id.env) +# pocket_id_logfile (str): Log file used to store the pocket-id's output. (Default: /var/log/pocket-id.log) +# pocket_id_pidfile (str): File used by pocket-id to store the process ID. (Default: /var/run/pocket-id.pid) +# pocket_id_runas (str): User to run pocket-id as. (Default: %%USER%%) + +. /etc/rc.subr + +name="pocket_id" +desc="OIDC provider that allows users to authenticate with their passkeys" +rcvar="pocket_id_enable" + +load_rc_config $name + +: ${pocket_id_enable:="NO"} +: ${pocket_id_env_file:="/usr/local/etc/pocket-id.env"} +: ${pocket_id_logfile:="/var/log/pocket-id.log"} +: ${pocket_id_pidfile:="/var/run/pocket-id.pid"} +: ${pocket_id_runas:="%%USER%%"} + +pocket_id_chdir="/var/db/pocket-id" +pidfile="${pocket_id_pidfile}" +procname="/usr/local/bin/pocket-id" +command="/usr/sbin/daemon" +command_args="-o '${pocket_id_logfile}' -p '${pidfile}' -u '${pocket_id_runas}' -t '${desc}' -- '${procname}'" + +run_rc_command "$1" |