File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ define Py3Package/wfb-ng-full/install
51
51
$(INSTALL_BIN ) $(PKG_BUILD_DIR ) /wfb_tx $(1 ) /usr/bin/
52
52
$(INSTALL_BIN ) $(PKG_BUILD_DIR ) /wfb_tx_cmd $(1 ) /usr/bin/
53
53
$(INSTALL_BIN ) $(PKG_BUILD_DIR ) /wfb_keygen $(1 ) /usr/bin/
54
+ $(INSTALL_DIR ) $(1 ) /etc/init.d
55
+ $(INSTALL_BIN ) ./files/wfb-ng.init $(1 ) /etc/init.d/wfb-ng
54
56
endef
55
57
56
58
$(eval $(call Py3Package,wfb-ng-full))
Original file line number Diff line number Diff line change
1
+ #! /bin/sh /etc/rc.common
2
+
3
+ START=99
4
+ STOP=10
5
+
6
+ USE_PROCD=1
7
+ NAME=wfb-ng
8
+
9
+ SYSUPGRADE_CONF=" /etc/sysupgrade.conf"
10
+ WFB_CFG=" /etc/wifibroadcast.cfg"
11
+ WFB_INIT=" /usr/sbin/wfb-ng.sh"
12
+ WFB_SERVER=" /usr/bin/wfb-server --profiles gs --cluster manual"
13
+
14
+ if [ -f $SYSUPGRADE_CONF ] && [ -x $WFB_INIT ] && ! grep -q $WFB_INIT $SYSUPGRADE_CONF
15
+ then
16
+ echo $WFB_INIT >> $SYSUPGRADE_CONF
17
+ fi
18
+
19
+ if [ -f $SYSUPGRADE_CONF ] && [ -f $WFB_CFG ] && ! grep -q $WFB_CFG $SYSUPGRADE_CONF
20
+ then
21
+ echo $WFB_CFG >> $SYSUPGRADE_CONF
22
+ fi
23
+
24
+ start_service () {
25
+ # start cluster node
26
+ if [ -x $WFB_INIT ]; then
27
+ procd_open_instance wfb-ng
28
+ procd_set_param command $WFB_INIT
29
+ procd_set_param respawn
30
+ procd_set_param stdout 1
31
+ procd_set_param stderr 1
32
+ procd_close_instance
33
+ fi
34
+
35
+ # start cluster manager
36
+ if [ -f $WFB_CFG ]; then
37
+ procd_open_instance wfb-ng-server
38
+ procd_set_param command $WFB_SERVER
39
+ procd_set_param respawn
40
+ procd_set_param stdout 1
41
+ procd_set_param stderr 1
42
+ procd_close_instance
43
+ fi
44
+ }
You can’t perform that action at this time.
0 commit comments