packages: znc: fix cert linking and add mirror

Properly (re-)create the link only if there's a file given and don't try to
change the owner of the link target.

Also add the znc release archive as a file mirror to prevent updates from
breaking the build.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28774 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jogo 2011-11-06 13:55:56 +00:00
parent 6f236e8d5c
commit 4fa2299e14
2 changed files with 5 additions and 4 deletions

View File

@ -9,10 +9,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=znc
PKG_VERSION:=0.098
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://znc.in/releases
PKG_SOURCE_URL:=http://znc.in/releases \
http://znc.in/releases/archive
PKG_MD5SUM:=5667b4acb1f01309d6eded77abac700c
PKG_BUILD_PARALLEL:=1

View File

@ -52,7 +52,7 @@ znc_global() {
config_get serverthrottle "$znc" serverthrottle
config_get znc_pem_file "$znc" znc_ssl_cert
[ -z $znc_pem_file -o -f $ZNC_CONFIG_PATH/znc.pem ] || ln -s "$znc_pem_file" $ZNC_CONFIG_PATH/znc.pem
[ -z "$znc_pem_file" ] || ln -sf "$znc_pem_file" $ZNC_CONFIG_PATH/znc.pem
[ -z $anoniplimit ] || echo "AnonIPLimit = $anoniplimit" >> $ZNC_CONFIG
[ -z $maxbuffersize ] || echo "MaxBufferSize = $maxbuffersize" >> $ZNC_CONFIG
@ -127,7 +127,7 @@ start() {
config_foreach add_listener listener
config_foreach add_user user
chown -R ${RUNAS_USER:-nobody}:${RUNAS_GROUP:-nogroup} /tmp/etc/znc
chown -hR ${RUNAS_USER:-nobody}:${RUNAS_GROUP:-nogroup} /tmp/etc/znc
fi
if [ "$EXTERNAL_CONFIG" -eq 1 -a "$RUNAS_USER" ]