mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Merge pull request #10672 from stintel/motion
motion: add basic procd init script and fix streaming
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=motion
|
PKG_NAME:=motion
|
||||||
PKG_VERSION:=4.2.2
|
PKG_VERSION:=4.2.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
||||||
PKG_LICENSE:=GPLv2
|
PKG_LICENSE:=GPLv2
|
||||||
@@ -35,6 +35,7 @@ define Package/motion
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/motion/conffiles
|
define Package/motion/conffiles
|
||||||
|
/etc/config/motion
|
||||||
/etc/motion.conf
|
/etc/motion.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -50,7 +51,9 @@ CONFIGURE_ARGS+= \
|
|||||||
--without-webp
|
--without-webp
|
||||||
|
|
||||||
define Package/motion/install
|
define Package/motion/install
|
||||||
$(INSTALL_DIR) $(1)/etc
|
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
||||||
|
$(INSTALL_CONF) ./files/motion.conf $(1)/etc/config/motion
|
||||||
|
$(INSTALL_BIN) ./files/motion.init $(1)/etc/init.d/motion
|
||||||
$(CP) $(PKG_BUILD_DIR)/motion-dist.conf $(1)/etc/motion.conf
|
$(CP) $(PKG_BUILD_DIR)/motion-dist.conf $(1)/etc/motion.conf
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/motion $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/motion $(1)/usr/bin/
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
config motion general
|
||||||
|
option enabled '0'
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=94
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
PROG="/usr/bin/motion"
|
||||||
|
CONF="/etc/motion.conf"
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
local enabled
|
||||||
|
|
||||||
|
config_load "motion"
|
||||||
|
config_get_bool enabled "general" "enabled" 0
|
||||||
|
[ "$enabled" -gt 0 ] || return 1
|
||||||
|
|
||||||
|
procd_open_instance
|
||||||
|
|
||||||
|
procd_set_param command "$PROG"
|
||||||
|
procd_append_param command -c "$CONF"
|
||||||
|
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
From c9bef916853c709fbf7f305da36da33ac4881660 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mr-DaveDev <MotionMrDaveDev@gmail.com>
|
||||||
|
Date: Sun, 1 Dec 2019 14:30:10 -0700
|
||||||
|
Subject: [PATCH] Remove poll option for mhd
|
||||||
|
|
||||||
|
closes #1063
|
||||||
|
---
|
||||||
|
webu.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/webu.c
|
||||||
|
+++ b/webu.c
|
||||||
|
@@ -1828,7 +1828,7 @@ static void webu_mhd_opts(struct mhdstar
|
||||||
|
static void webu_mhd_flags(struct mhdstart_ctx *mhdst){
|
||||||
|
|
||||||
|
/* This sets the MHD startup flags based upon what user put into configuration */
|
||||||
|
- mhdst->mhd_flags = MHD_USE_THREAD_PER_CONNECTION | MHD_USE_POLL| MHD_USE_SELECT_INTERNALLY;
|
||||||
|
+ mhdst->mhd_flags = MHD_USE_THREAD_PER_CONNECTION;
|
||||||
|
|
||||||
|
if (mhdst->ipv6) mhdst->mhd_flags = mhdst->mhd_flags | MHD_USE_DUAL_STACK;
|
||||||
|
|
||||||
Reference in New Issue
Block a user