Compare commits

...

2 Commits

4 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
VERSION=`xpath -q -e 'string(//PLUGIN/@version)' zabbix_agent.plg` VERSION=`xpath -q -e 'string(//PLUGIN/@version)' zabbix_agent.plg`
FILE="zabbix_agent-$VERSION.package.tgz" FILE="zabbix_agent-$VERSION-x86_64-1.txz"
echo "Version in plugin file: $VERSION" echo "Version in plugin file: $VERSION"
echo "Generated file will be: $FILE" echo "Generated file will be: $FILE"
@ -29,7 +29,7 @@ read
echo "Creating $FILE..." echo "Creating $FILE..."
echo echo
tar -czvf "$FILE" files tar -cv --owner=root --group=root --lzma -C files -f "$FILE" .
echo echo
read md5 _ < <(md5sum "$FILE") read md5 _ < <(md5sum "$FILE")
echo "MD5 of the resulting file for the plugin file: $md5" echo "MD5 of the resulting file for the plugin file: $md5"

Binary file not shown.

Binary file not shown.

View File

@ -6,10 +6,10 @@
<!ENTITY plgauthor "fabianonline"> <!ENTITY plgauthor "fabianonline">
<!ENTITY baseURL "https://git.schle.nz/fabian/unraid-zabbix_agent/raw/branch/main"> <!ENTITY baseURL "https://git.schle.nz/fabian/unraid-zabbix_agent/raw/branch/main">
<!ENTITY pluginURL "&baseURL;/zabbix_agent.plg"> <!ENTITY pluginURL "&baseURL;/zabbix_agent.plg">
<!ENTITY version "2020.08.11"> <!ENTITY version "2020.08.11.1">
<!ENTITY packageName "zabbix_agent-&version;.package.tgz"> <!ENTITY packageName "zabbix_agent-&version;-x86_64-1.txz">
<!ENTITY packageURL "&baseURL;/&packageName;"> <!ENTITY packageURL "&baseURL;/&packageName;">
<!ENTITY packageMD5 "dcf2e2bef5f4f88876ac52ed5ca1046c"> <!ENTITY packageMD5 "5eedea739129f638ac5098945039d43b">
]> ]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;"> <PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;">
@ -55,8 +55,9 @@ if [ -x /etc/rc.d/rc.zabbix_agentd ]; then
fi fi
echo "Extracting support files..." echo "Extracting support files..."
tar -xzvf /boot/config/plugins/zabbix_agent/&packageName; --strip=1 -C / upgradepkg --install-new /boot/config/plugins/zabbix_agent/&packageName;
echo "Starting zabbix_agent..."
/etc/rc.d/rc.zabbix_agentd start /etc/rc.d/rc.zabbix_agentd start
</INLINE></FILE> </INLINE></FILE>
@ -67,14 +68,13 @@ tar -xzvf /boot/config/plugins/zabbix_agent/&packageName; --strip=1 -C /
echo "Removal of zabbix_agent plugin started." echo "Removal of zabbix_agent plugin started."
echo "Stopping zabbix_agentd..." echo "Stopping zabbix_agentd..."
/etc/rc.d/rc.zabbix_agentd stop /etc/rc.d/rc.zabbix_agentd stop
echo "Deleting /usr/sbin/zabbix_agentd..."
rm /usr/sbin/zabbix_agentd echo "Uninstalling package..."
echo "Deleting /etc/rc.d/rc.zabbix_agentd..." removepkg zabbix_agent
rm /etc/rc.d/rc.zabbix_agentd
echo "Deleting /boot/config/plugins/zabbix_agent/..." echo "Removing remaining plugin files..."
rm -rf /boot/config/plugins/zabbix_agent/ rm -rf /boot/config/plugins/zabbix_agent
echo "Deleting /usr/local/emhttp/plugins/zabbix_agent/..."
rm -rf /usr/local/emhttp/plugins/zabbix_agent/
echo "Removal of zabbix_agent plugin completed." echo "Removal of zabbix_agent plugin completed."
</INLINE></FILE> </INLINE></FILE>