b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | #!/bin/sh /etc/rc.common |
2 | |||||
3 | START=94 | ||||
4 | USE_PROCD=1 | ||||
5 | |||||
6 | PROG="/usr/bin/motion" | ||||
7 | CONF="/etc/motion.conf" | ||||
8 | |||||
9 | start_service() { | ||||
10 | local enabled | ||||
11 | |||||
12 | config_load "motion" | ||||
13 | config_get_bool enabled "general" "enabled" 0 | ||||
14 | [ "$enabled" -gt 0 ] || return 1 | ||||
15 | |||||
16 | procd_open_instance | ||||
17 | |||||
18 | procd_set_param command "$PROG" | ||||
19 | procd_append_param command -c "$CONF" | ||||
20 | |||||
21 | procd_close_instance | ||||
22 | } |