diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 00028839c..17b4a3bbf 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -126,8 +126,8 @@ define Package/baresip/install $(1)/usr/lib/baresip/modules \ $(1)/usr/share/baresip \ $(1)/etc/baresip \ - $(1)/etc/init.d \ - $(1)/etc/default + $(1)/etc/uci-defaults \ + $(1)/etc/init.d $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbaresip.so* $(1)/usr/lib $(INSTALL_DATA) \ @@ -137,7 +137,7 @@ define Package/baresip/install $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/docs/examples/accounts $(SED) '/^#module_path/s|^#||;s|/local||' $(PKG_BUILD_DIR)/docs/examples/config $(INSTALL_DATA) $(PKG_BUILD_DIR)/docs/examples/{accounts,config,contacts} $(1)/etc/baresip - $(INSTALL_CONF) ./files/baresip.default $(1)/etc/default/baresip + $(INSTALL_DATA) ./files/baresip.defaults $(1)/etc/uci-defaults/90-baresip $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip endef @@ -145,7 +145,6 @@ define Package/baresip/conffiles /etc/baresip/accounts /etc/baresip/config /etc/baresip/contacts -/etc/default/baresip endef ################## diff --git a/net/baresip/files/baresip.default b/net/baresip/files/baresip.default deleted file mode 100644 index b251c80e7..000000000 --- a/net/baresip/files/baresip.default +++ /dev/null @@ -1,10 +0,0 @@ -### bareSIP init configuration ### - -# Uncomment once you verified your configuration, otherwise the init script will -# not start bareSIP. -#ENABLE_BARESIP="yes" - -# The following is added to the command line when starting bareSIP: -OPTIONS="" - -# The configuration for the daemon is done in /etc/baresip! diff --git a/net/baresip/files/baresip.defaults b/net/baresip/files/baresip.defaults new file mode 100644 index 000000000..7c1cd257b --- /dev/null +++ b/net/baresip/files/baresip.defaults @@ -0,0 +1,12 @@ +CFGFILE=/etc/config/baresip + +if [ ! -f "$CFGFILE" ]; then + cat >$CFGFILE <