#!/bin/sh
#
# $NetBSD: octoprint.sh,v 1.3 2021/08/29 20:00:43 khorben Exp $
#
# Startup script for OctoPrint
#
# PROVIDE: octoprint
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start OctoPrint:
#
# octoprint=YES

$_rc_subr_loaded . /etc/rc.subr

name="octoprint"
rcvar=${name}
command="/usr/pkg/bin/octoprint-3.12"
pidfile="/tmp/$name.pid"
procname="/usr/pkg/bin/python3.12"
command_args="daemon start"

load_rc_config $name
run_rc_command "$1"
