diff --git a/pandora_agents/unix/DEBIAN/conffiles b/pandora_agents/unix/DEBIAN/conffiles index dae6551ac7..0a0587e3db 100755 --- a/pandora_agents/unix/DEBIAN/conffiles +++ b/pandora_agents/unix/DEBIAN/conffiles @@ -1,2 +1 @@ /etc/pandora/pandora_agent.conf -/etc/pandora/plugins diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index d9e9c4f96a..28efbf13d5 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -39,6 +39,8 @@ mkdir -p temp_package/etc/pandora/collections mkdir -p temp_package/etc/init.d/ mkdir -p temp_package/var/log/pandora/ mkdir -p temp_package/usr/share/man/man1/ +mkdir -p temp_package/usr/share/pandora_agent/plugins +mkdir -p temp_package/tmp echo "Make directory system tree for package." cp DEBIAN temp_package -R @@ -63,6 +65,10 @@ cp Linux/pandora_agent.conf temp_package/etc/pandora/ cp -aRf man/man1/* temp_package/usr/share/man/man1/ +#Create a temp file for to update files of plugins dir but don't crush dir. +cp -aRf temp_package/usr/share/pandora_agent/plugins temp_package/tmp +rm -rf temp_package/usr/share/pandora_agent/plugins/* + echo "Remove the SVN files and other temp files." for item in `find temp_package` do diff --git a/pandora_agents/unix/DEBIAN/postinst b/pandora_agents/unix/DEBIAN/postinst index 664888e41c..1b18887746 100755 --- a/pandora_agents/unix/DEBIAN/postinst +++ b/pandora_agents/unix/DEBIAN/postinst @@ -9,6 +9,10 @@ PANDORA_CFG=/etc/pandora LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"` +echo "Copy new version of plugins into dir" +cp -i /tmp/plugins/* /usr/share/pandora_agent/plugins/ +rm /tmp/plugins -rf + echo "Linking Pandora FMS Agent plugins directory to $PANDORA_CFG/plugins..." rm $PANDORA_CFG/plugins 2> /dev/null ln -s $PANDORA_HOME/plugins $PANDORA_CFG 2> /dev/null