mirror of
https://github.com/limosek/zaf.git
synced 2025-11-01 18:17:37 +01:00
New package management
Repaired install Added external item support
This commit is contained in:
5
files/debian/changelog.template
Normal file
5
files/debian/changelog.template
Normal file
@@ -0,0 +1,5 @@
|
||||
PACKAGE (1.0) zaf; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Lukas Macura <lukas@macura.cz> Wed, 06 Apr 2016 13:56:25 +0200
|
||||
11
files/debian/control.template
Normal file
11
files/debian/control.template
Normal file
@@ -0,0 +1,11 @@
|
||||
Package: zaf
|
||||
Version: {ZAF_VERSION}
|
||||
Homepage: https://github.com/limosek/zaf
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: dash, awk, sed, grep, coreutils {ZAF_DEPENDS}
|
||||
Maintainer: Lukas Macura <lukas@macura.cz>
|
||||
Description: Zabbix agent framework package
|
||||
This tool is used to maintain external zabbix checks in one place. Primary goal is not to make all plugins available here but to be able to use any plugin and decentralized development. If you are maintainer of some external check, it is enough to create zaf file in your repo and use zaf installer everywhere.
|
||||
|
||||
17
files/debian/postinst.template
Normal file
17
files/debian/postinst.template
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
configure)
|
||||
if [ -f /usr/lib/zaf/install.sh ] && [ -f /etc/zaf.conf ] && [ -f /usr/lib/zaf/zaf.lib.sh ] && which zaf >/dev/null; then
|
||||
. /etc/zaf.conf
|
||||
. /usr/lib/zaf/zaf.lib.sh
|
||||
. /usr/lib/zaf/os.lib.sh
|
||||
. /usr/lib/zaf/ctrl.lib.sh
|
||||
cd /usr/lib/zaf && /usr/lib/zaf/install.sh reconf
|
||||
[ -n "{PLUGINS}" ] && zaf reinstall {PLUGINS} {IPLUGINS}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
true
|
||||
|
||||
10
files/debian/preinst.template
Normal file
10
files/debian/preinst.template
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
install)
|
||||
if [ -d /usr/lib/zaf ]; then
|
||||
echo "Do zaf self-remove first! Cannot mix packaged and non-packaged version!"
|
||||
exit 2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
7
files/debian/prerm.template
Normal file
7
files/debian/prerm.template
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
remove)
|
||||
rm -rf /usr/lib/zaf/plugins /usr/lib/zaf/repo
|
||||
;;
|
||||
esac
|
||||
12
files/debian/zaf.conf-deb.template
Normal file
12
files/debian/zaf.conf-deb.template
Normal file
@@ -0,0 +1,12 @@
|
||||
ZAF_PKG='dpkg'
|
||||
ZAF_AGENT_PKG='zabbix-agent'
|
||||
ZAF_TMP_BASE='/tmp/zaf'
|
||||
ZAF_LIB_DIR='/usr/lib/zaf'
|
||||
ZAF_BIN_DIR='/usr/bin'
|
||||
ZAF_PLUGINS_DIR='/usr/lib/zaf/plugins'
|
||||
ZAF_PLUGINS_URL='https://raw.githubusercontent.com/limosek/zaf-plugins/master/'
|
||||
ZAF_PLUGINS_GITURL='https://github.com/limosek/zaf-plugins.git'
|
||||
ZAF_REPO_DIR='/usr/lib/zaf/repo'
|
||||
ZAF_AGENT_CONFIGD='/etc/zabbix/zabbix_agentd.d'
|
||||
ZAF_AGENT_BIN='/usr/sbin/zabbix_agentd'
|
||||
ZAF_AGENT_RESTART='service zabbix-agent restart'
|
||||
Reference in New Issue
Block a user