pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-octoprint: register an RC script



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Mon Dec 7 22:15:44 2020 +0100
Changeset:	da7c89c1bf554755ea366e1e6f91f8f24f351950

Modified Files:
	py-octoprint/Makefile
Added Files:
	py-octoprint/files/octoprint.sh

Log Message:
py-octoprint: register an RC script

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=da7c89c1bf554755ea366e1e6f91f8f24f351950

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-octoprint/Makefile           |  2 ++
 py-octoprint/files/octoprint.sh | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)

diffs:
diff --git a/py-octoprint/Makefile b/py-octoprint/Makefile
index 47fd15783a..ddb926a341 100644
--- a/py-octoprint/Makefile
+++ b/py-octoprint/Makefile
@@ -12,6 +12,8 @@ HOMEPAGE=	https://github.com/OctoPrint/OctoPrint/
 COMMENT=	Snappy web interface for 3D printers
 LICENSE=	gnu-agpl-v3
 
+RCD_SCRIPTS=	octoprint
+
 PYTHON_VERSIONS_ACCEPTED=	37 36
 
 DEPENDS+=	${PYPKGPREFIX}-blinker>=1.4:../../devel/py-blinker
diff --git a/py-octoprint/files/octoprint.sh b/py-octoprint/files/octoprint.sh
new file mode 100644
index 0000000000..3267ba226b
--- /dev/null
+++ b/py-octoprint/files/octoprint.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# PROVIDE: octoprint
+# REQUIRE: DAEMON
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="octoprint"
+rcvar=$name
+command="@PREFIX@/bin/octoprint-3.7"
+pidfile="/tmp/$name.pid"
+procname="@PREFIX@/bin/python3.7"
+command_args="daemon start"
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index