py-octoprint: let the RC script work unprivileged This takes advantage of the introduction of the SYSCONFBASE variable. Tested on NetBSD/amd64. Bumps PKGREVISION.diff -r1.3 -r1.4 pkgsrc/print/py-octoprint/Makefile
(khorben)
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.3 2021/08/05 13:08:08 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.4 2021/08/29 20:00:43 khorben Exp $ | |
2 | 2 | |||
3 | DISTNAME= ${GITHUB_PROJECT}-${PKGVERSION_NOREV} | 3 | DISTNAME= ${GITHUB_PROJECT}-${PKGVERSION_NOREV} | |
4 | PKGNAME= ${PYPKGPREFIX}-octoprint-1.6.1 | 4 | PKGNAME= ${PYPKGPREFIX}-octoprint-1.6.1 | |
5 | PKGREVISION= 1 | |||
5 | CATEGORIES= print | 6 | CATEGORIES= print | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=OctoPrint/} | 7 | MASTER_SITES= ${MASTER_SITE_GITHUB:=OctoPrint/} | |
7 | GITHUB_PROJECT= OctoPrint | 8 | GITHUB_PROJECT= OctoPrint | |
8 | GITHUB_TAG= ${PKGVERSION_NOREV} | 9 | GITHUB_TAG= ${PKGVERSION_NOREV} | |
9 | 10 | |||
10 | MAINTAINER= khorben@defora.org | 11 | MAINTAINER= khorben@defora.org | |
11 | HOMEPAGE= https://github.com/OctoPrint/OctoPrint/ | 12 | HOMEPAGE= https://github.com/OctoPrint/OctoPrint/ | |
12 | COMMENT= Snappy web interface for 3D printers | 13 | COMMENT= Snappy web interface for 3D printers | |
13 | LICENSE= gnu-agpl-v3 | 14 | LICENSE= gnu-agpl-v3 | |
14 | 15 | |||
15 | RCD_SCRIPTS= octoprint | 16 | RCD_SCRIPTS= octoprint | |
16 | 17 | |||
17 | PYTHON_VERSIONS_INCOMPATIBLE= 27 | 18 | PYTHON_VERSIONS_INCOMPATIBLE= 27 |
@@ -1,25 +1,25 @@ | @@ -1,25 +1,25 @@ | |||
1 | #!@RCD_SCRIPTS_SHELL@ | 1 | #!@RCD_SCRIPTS_SHELL@ | |
2 | # | 2 | # | |
3 | # $NetBSD: octoprint.sh,v 1.2 2021/05/30 21:53:11 khorben Exp $ | 3 | # $NetBSD: octoprint.sh,v 1.3 2021/08/29 20:00:43 khorben Exp $ | |
4 | # | 4 | # | |
5 | # Startup script for OctoPrint | 5 | # Startup script for OctoPrint | |
6 | # | 6 | # | |
7 | # PROVIDE: octoprint | 7 | # PROVIDE: octoprint | |
8 | # REQUIRE: DAEMON | 8 | # REQUIRE: DAEMON | |
9 | # KEYWORD: shutdown | 9 | # KEYWORD: shutdown | |
10 | # | 10 | # | |
11 | # You will need to set some variables in /etc/rc.conf to start OctoPrint: | 11 | # You will need to set some variables in @SYSCONFBASE@/rc.conf to start OctoPrint: | |
12 | # | 12 | # | |
13 | # octoprint=YES | 13 | # octoprint=YES | |
14 | 14 | |||
15 | $_rc_subr_loaded . /etc/rc.subr | 15 | $_rc_subr_loaded . @SYSCONFBASE@/rc.subr | |
16 | 16 | |||
17 | name="octoprint" | 17 | name="octoprint" | |
18 | rcvar=${name} | 18 | rcvar=${name} | |
19 | command="@PREFIX@/bin/octoprint-@PYVERSSUFFIX@" | 19 | command="@PREFIX@/bin/octoprint-@PYVERSSUFFIX@" | |
20 | pidfile="/tmp/$name.pid" | 20 | pidfile="/tmp/$name.pid" | |
21 | procname="@PREFIX@/bin/python@PYVERSSUFFIX@" | 21 | procname="@PREFIX@/bin/python@PYVERSSUFFIX@" | |
22 | command_args="daemon start" | 22 | command_args="daemon start" | |
23 | 23 | |||
24 | load_rc_config $name | 24 | load_rc_config $name | |
25 | run_rc_command "$1" | 25 | run_rc_command "$1" |