|
|
@@ -24,6 +24,7 @@ export path_url="$YNH_APP_ARG_PATH"
|
|
|
admin="$YNH_APP_ARG_ADMIN"
|
|
|
is_public="$YNH_APP_ARG_IS_PUBLIC"
|
|
|
language="$YNH_APP_ARG_LANGUAGE"
|
|
|
+nonfree="$YNH_APP_ARG_ADD_NONFREE"
|
|
|
|
|
|
### If it's a multi-instance app, meaning it can be installed several times independently
|
|
|
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
|
|
@@ -100,20 +101,19 @@ ynh_print_info "Install dependencies"
|
|
|
wget "https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb"
|
|
|
dpkg -i zabbix-release_*.deb
|
|
|
rm zabbix-release_*.deb
|
|
|
-echo "deb http://deb.debian.org/debian stretch non-free" >/etc/apt/sources.list.d/non-free.list
|
|
|
+
|
|
|
+if [ $nonfree ];then
|
|
|
+ echo "deb http://deb.debian.org/debian stretch non-free" >/etc/apt/sources.list.d/non-free.list
|
|
|
+fi
|
|
|
ynh_package_update
|
|
|
-ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd snmp-mibs-downloader libjs-prototype zabbix-server-mysql zabbix-agent jq
|
|
|
-yunohost service add snmpd -d "Management of SNMP Daemon"
|
|
|
-DEBIAN_FRONTEND=noninteractive apt-get -y download zabbix-frontend-php
|
|
|
-ar x ./*.deb
|
|
|
-tar xzf control.tar.gz
|
|
|
-sed -i 's/apache2 | httpd, //' control
|
|
|
-tar --ignore-failed-read -cvzf control.tar.gz {post,pre}{inst,rm} md5sums control
|
|
|
-ar rcs zabbix-frontend-php+stretch_all-noapache2.deb debian-binary control.tar.gz data.tar.xz
|
|
|
-
|
|
|
-dpkg -i zabbix-frontend-php+stretch_all-noapache2.deb
|
|
|
-
|
|
|
-rm -fr zabbix-*.deb
|
|
|
+if [ $nonfree ];then
|
|
|
+ ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd snmp-mibs-downloader libjs-prototype jq
|
|
|
+else
|
|
|
+ ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+ynh_package_install zabbix-server-mysql zabbix-agent zabbix-frontend-php
|
|
|
DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php
|
|
|
|
|
|
sed -i "s/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/g" /etc/locale.gen
|