2022-12-10 23:42:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# PROVIDE: poudboot
|
2023-07-14 14:06:40 +00:00
|
|
|
# REQUIRE: FILESYSTEM kld
|
2022-12-10 23:42:02 +00:00
|
|
|
# AFTER: netif
|
2023-07-14 14:06:40 +00:00
|
|
|
# KEYWORD: shutdown
|
2022-12-10 23:42:02 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
2023-07-14 14:06:40 +00:00
|
|
|
|
2022-12-10 23:42:02 +00:00
|
|
|
name=poudboot
|
|
|
|
rcvar=${name}_enable
|
2023-07-14 14:06:40 +00:00
|
|
|
desc="Poudriere Loop"
|
|
|
|
|
2022-12-10 23:42:02 +00:00
|
|
|
load_rc_config $name
|
|
|
|
|
2024-02-11 19:59:55 +00:00
|
|
|
: ${poudboot_enable:=NO}
|
2023-07-14 14:06:40 +00:00
|
|
|
|
|
|
|
command=/usr/sbin/daemon
|
|
|
|
pidfile=/var/run/${name}.pid
|
2022-12-10 23:42:02 +00:00
|
|
|
|
2024-05-05 16:08:01 +00:00
|
|
|
command_args="-p $pidfile -u root -f -S -T $name nice -n 10 lockf -t 0 /var/run/$name.lock /root/.cargo/bin/poudboot /opt/poudriere/poudboot.sqlite3"
|
2022-12-10 23:42:02 +00:00
|
|
|
|
2023-07-14 15:18:38 +00:00
|
|
|
export PATH="${PATH}:/usr/local/bin"
|
2022-12-10 23:42:02 +00:00
|
|
|
run_rc_command "$1"
|