Skip to content

Commit

Permalink
Fix openwrt sysupgrade usage
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Sep 23, 2024
1 parent 1ba87b2 commit 7d9367a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
5 changes: 5 additions & 0 deletions openwrt/net/wfb-ng-full/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ define Package/wfb-ng-full/description
receiver or transmitter with divesity.
endef

define Package/wfb-ng/conffiles
/usr/sbin/wfb-ng.sh
/etc/wifibroadcast.cfg
endef

define Py3Package/wfb-ng-full/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
Expand Down
12 changes: 0 additions & 12 deletions openwrt/net/wfb-ng-full/files/wfb-ng.init
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,11 @@ START=99
STOP=10

USE_PROCD=1
NAME=wfb-ng

SYSUPGRADE_CONF="/etc/sysupgrade.conf"
WFB_CFG="/etc/wifibroadcast.cfg"
WFB_INIT="/usr/sbin/wfb-ng.sh"
WFB_SERVER="/usr/bin/wfb-server --profiles gs --cluster manual"

if [ -f $SYSUPGRADE_CONF ] && [ -x $WFB_INIT ] && ! grep -q $WFB_INIT $SYSUPGRADE_CONF
then
echo $WFB_INIT >> $SYSUPGRADE_CONF
fi

if [ -f $SYSUPGRADE_CONF ] && [ -f $WFB_CFG ] && ! grep -q $WFB_CFG $SYSUPGRADE_CONF
then
echo $WFB_CFG >> $SYSUPGRADE_CONF
fi

start_service() {
# start cluster node
if [ -x $WFB_INIT ]; then
Expand Down
4 changes: 4 additions & 0 deletions openwrt/net/wfb-ng/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ define Package/wfb-ng/description
standalone receiver or transmitter without diversity.
endef

define Package/wfb-ng/conffiles
/usr/sbin/wfb-ng.sh
endef

define Package/wfb-ng/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wfb_rx $(1)/usr/bin/
Expand Down
8 changes: 0 additions & 8 deletions openwrt/net/wfb-ng/files/wfb-ng.init
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@ START=99
STOP=10

USE_PROCD=1
NAME=wfb-ng

SYSUPGRADE_CONF="/etc/sysupgrade.conf"
WFB_INIT="/usr/sbin/wfb-ng.sh"

if [ -f $SYSUPGRADE_CONF ] && [ -x $WFB_INIT ] && ! grep -q $WFB_INIT $SYSUPGRADE_CONF
then
echo $WFB_INIT >> $SYSUPGRADE_CONF
fi

start_service() {
if [ -x $WFB_INIT ]; then
procd_open_instance wfb-ng
Expand Down

0 comments on commit 7d9367a

Please sign in to comment.