2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/postinst, DEBIAN/make_deb_package.sh: fixed the script to generate deb package. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2780 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d80f3eb28a
commit
88a7e52238
|
@ -1,3 +1,8 @@
|
|||
2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* DEBIAN/postinst, DEBIAN/make_deb_package.sh: fixed the script to generate
|
||||
deb package.
|
||||
|
||||
2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* DEBIAN/make_deb_package.sh: fixed the permissions to DEBIAN temp package.
|
||||
|
|
|
@ -29,53 +29,68 @@ fi
|
|||
cd ..
|
||||
|
||||
echo "Make a \"temp_package\" temp dir for job."
|
||||
mkdir -p temp_package/usr/share/pandora_agent
|
||||
mkdir -p temp_package/var/spool/pandora/data_out
|
||||
mkdir -p temp_package/var/log/pandora/
|
||||
mkdir -p temp_package/etc/pandora
|
||||
#~ mkdir -p temp_package/usr/share/pandora_agent
|
||||
#~ mkdir -p temp_package/var/spool/pandora/data_out
|
||||
#~ mkdir -p temp_package/var/log/pandora/
|
||||
#~ mkdir -p temp_package/etc/pandora
|
||||
#~ mkdir -p temp_package/etc/init.d/
|
||||
#~ mkdir -p temp_package/usr/bin
|
||||
|
||||
mkdir -p temp_package/usr
|
||||
mkdir -p temp_package/usr/share/pandora_agent/
|
||||
mkdir -p temp_package/usr/bin/
|
||||
mkdir -p temp_package/usr/sbin/
|
||||
mkdir -p temp_package/etc/pandora/
|
||||
mkdir -p temp_package/etc/init.d/
|
||||
mkdir -p temp_package/usr/bin
|
||||
mkdir -p temp_package/var/log/pandora/
|
||||
|
||||
echo "Make directory system tree for package."
|
||||
cp DEBIAN temp_package -R
|
||||
chmod 755 -R temp_package/DEBIAN
|
||||
|
||||
PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log
|
||||
PANDORA_BIN=temp_package/usr/bin/pandora_agent
|
||||
PANDORA_HOME=temp_package/usr/share/pandora_agent
|
||||
TENTACLE=temp_package/usr/bin/tentacle_client
|
||||
PANDORA_CFG=temp_package/etc/pandora
|
||||
PANDORA_STARTUP=temp_package/etc/init.d/pandora_agent_daemon
|
||||
cp -aRf * temp_package/usr/share/pandora_agent/
|
||||
cp -aRf tentacle_client temp_package/usr/bin/
|
||||
cp -aRf pandora_agent temp_package/usr/bin/
|
||||
cp -aRf pandora_agent_daemon temp_package/etc/init.d/pandora_agent_daemon
|
||||
cp Linux/pandora_agent.conf temp_package/etc/pandora/
|
||||
|
||||
|
||||
#~ PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log
|
||||
#~ PANDORA_BIN=temp_package/usr/bin/pandora_agent
|
||||
#~ PANDORA_HOME=temp_package/usr/share/pandora_agent
|
||||
#~ TENTACLE=temp_package/usr/bin/tentacle_client
|
||||
#~ PANDORA_CFG=temp_package/etc/pandora
|
||||
#~ PANDORA_STARTUP=temp_package/etc/init.d/pandora_agent_daemon
|
||||
|
||||
# Create logfile
|
||||
if [ ! -z "`touch $PANDORA_LOG`" ]
|
||||
then
|
||||
echo "Seems to be a problem generating logfile ($PANDORA_LOG) please check it";
|
||||
exit
|
||||
else
|
||||
echo "Creating logfile at $PANDORA_LOG..."
|
||||
fi
|
||||
#~ if [ ! -z "`touch $PANDORA_LOG`" ]
|
||||
#~ then
|
||||
#~ echo "Seems to be a problem generating logfile ($PANDORA_LOG) please check it";
|
||||
#~ exit
|
||||
#~ else
|
||||
#~ echo "Creating logfile at $PANDORA_LOG..."
|
||||
#~ fi
|
||||
|
||||
# Copying agent
|
||||
echo "Copying Pandora FMS Agent to $PANDORA_BIN..."
|
||||
cp pandora_agent $PANDORA_BIN
|
||||
|
||||
echo "Copying Pandora FMS Agent contrib dir to $PANDORA_HOME/..."
|
||||
cp pandora_agent_daemon $PANDORA_HOME
|
||||
|
||||
echo "Copying default agent configuration to $PANDORA_HOME/pandora_agent.conf"
|
||||
cp pandora_agent.conf $PANDORA_HOME/pandora_agent.conf
|
||||
|
||||
echo "Copying Pandora FMS Agent plugins to $PANDORA_HOME/plugins..."
|
||||
cp -r plugins $PANDORA_HOME
|
||||
|
||||
echo "Copying tentacle client to $TENTACLE"
|
||||
cp tentacle_client $TENTACLE
|
||||
|
||||
echo "Linking start-up daemon script at $PANDORA_STARTUP";
|
||||
cp pandora_agent_daemon $PANDORA_STARTUP
|
||||
|
||||
touch $PANDORA_CFG/pandora_agent.conf
|
||||
#~ # Copying agent
|
||||
#~ echo "Copying Pandora FMS Agent to $PANDORA_BIN..."
|
||||
#~ cp pandora_agent $PANDORA_BIN
|
||||
#~
|
||||
#~ echo "Copying Pandora FMS Agent contrib dir to $PANDORA_HOME/..."
|
||||
#~ cp pandora_agent_daemon $PANDORA_HOME
|
||||
#~
|
||||
#~ echo "Copying default agent configuration to $PANDORA_HOME/pandora_agent.conf"
|
||||
#~ cp pandora_agent.conf $PANDORA_HOME/pandora_agent.conf
|
||||
#~
|
||||
#~ echo "Copying Pandora FMS Agent plugins to $PANDORA_HOME/plugins..."
|
||||
#~ cp -r plugins $PANDORA_HOME
|
||||
#~
|
||||
#~ echo "Copying tentacle client to $TENTACLE"
|
||||
#~ cp tentacle_client $TENTACLE
|
||||
#~
|
||||
#~ echo "Linking start-up daemon script at $PANDORA_STARTUP";
|
||||
#~ cp pandora_agent_daemon $PANDORA_STARTUP
|
||||
#~
|
||||
#~ touch $PANDORA_CFG/pandora_agent.conf
|
||||
|
||||
echo "Remove the SVN files and other temp files."
|
||||
for item in `find temp_package`
|
||||
|
|
|
@ -13,8 +13,8 @@ rm $PANDORA_CFG/plugins 2> /dev/null
|
|||
ln -s $PANDORA_HOME/plugins $PANDORA_CFG 2> /dev/null
|
||||
|
||||
echo "Linking Pandora FMS Agent configuration to $PANDORA_CFG/pandora_agent.conf..."
|
||||
rm $PANDORA_CFG/pandora_agent.conf 2> /dev/null
|
||||
ln -s $PANDORA_HOME/pandora_agent.conf $PANDORA_CFG/pandora_agent.conf
|
||||
#~ rm $PANDORA_CFG/pandora_agent.conf 2> /dev/null
|
||||
#~ ln -s $PANDORA_HOME/pandora_agent.conf $PANDORA_CFG/pandora_agent.conf
|
||||
|
||||
echo "Start log of agent."
|
||||
echo "$LOG_TIMESTAMP Pandora FMS installer has created this file at startup" > $PANDORA_LOG
|
||||
|
|
Loading…
Reference in New Issue