mirror of
https://github.com/YunoHost-Apps/netdata_ynh.git
synced 2024-09-03 19:46:33 +02:00
Upgrade to upstream version 1.12.2 (#29)
* Upgrade to upstream version 1.12.1 * Upgrade to upstream version 1.12.2
This commit is contained in:
parent
9421b09f8c
commit
d248520c50
8 changed files with 21 additions and 29 deletions
|
@ -14,7 +14,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste
|
|||
(**physical** & **virtual** servers, **containers**, **IoT** devices), without
|
||||
disrupting their core function._
|
||||
|
||||
**Shipped version:** 1.11.1
|
||||
**Shipped version:** 1.12.2
|
||||
|
||||
**Customization brought by the package:**
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.11.1/netdata-v1.11.1.tar.gz
|
||||
SOURCE_SUM=0150b2a060da0e5cc844bd9540d6704cd352c434ea1bb9d5268131830a815736
|
||||
SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.12.2/netdata-v1.12.2.tar.gz
|
||||
SOURCE_SUM=f8cd689ec1ab262903b5a54c8df2fd0fe6e5e7b0ab4a2c60fde4e88f37aa72b5
|
||||
SOURCE_FORMAT=tar.gz
|
||||
|
|
4
conf/uninstaller.src
Normal file
4
conf/uninstaller.src
Normal file
|
@ -0,0 +1,4 @@
|
|||
SOURCE_URL=https://raw.githubusercontent.com/netdata/netdata/v1.12.2/packaging/installer/netdata-uninstaller.sh
|
||||
SOURCE_SUM=a91970882dd90fd3b2352be185c6df9fc1b0ecda9e08677a1f47a0fd281a7615
|
||||
SOURCE_FILENAME=netdata-uninstaller.sh
|
||||
SOURCE_EXTRACT=false
|
|
@ -6,7 +6,7 @@
|
|||
"en": "real-time performance and health monitoring",
|
||||
"fr": "Monitoring serveur en temps reel"
|
||||
},
|
||||
"version": "1.11.1~ynh1",
|
||||
"version": "1.12.2~ynh1",
|
||||
"url": "http://my-netdata.io/",
|
||||
"license": "GPL-3.0",
|
||||
"maintainer": {
|
||||
|
|
|
@ -14,6 +14,10 @@ configure_netdata() {
|
|||
s@# registry to announce = https://registry.my-netdata.io@registry to announce = https://$domain$path_url@
|
||||
}" /opt/netdata/etc/netdata/netdata.conf
|
||||
|
||||
# Opt-out from sending anonymous statistics
|
||||
# (see https://docs.netdata.cloud/docs/anonymous-statistics/#opt-out)
|
||||
touch /opt/netdata/etc/netdata/.opt-out-from-anonymous-statistics
|
||||
|
||||
# Add a web_log entry for every YunoHost domain
|
||||
netdata_add_yunohost_web_logs
|
||||
|
||||
|
|
|
@ -95,9 +95,6 @@ ynh_add_nginx_config
|
|||
pushd $NETDATA_TMPDIR
|
||||
./netdata-installer.sh --install /opt --dont-wait
|
||||
|
||||
# Store the uninstaller for the removal script
|
||||
mv ./netdata-uninstaller.sh /opt/netdata/etc/netdata
|
||||
|
||||
configure_netdata
|
||||
|
||||
# Store the app.src file
|
||||
|
|
|
@ -39,30 +39,21 @@ ynh_remove_app_dependencies
|
|||
# Prepare to execute uninstaller(generated by NetData install script)
|
||||
UNINSTALL_SCRIPT="netdata-uninstaller.sh"
|
||||
|
||||
ynh_setup_source "/tmp" uninstaller
|
||||
chmod +x /tmp/$UNINSTALL_SCRIPT
|
||||
|
||||
# Move outside the directory (which will be removed)
|
||||
mv /opt/netdata/etc/netdata/${UNINSTALL_SCRIPT} /tmp
|
||||
cd /tmp
|
||||
|
||||
# Remove the need for interaction
|
||||
ynh_replace_string "rm -i" "rm -f" ${UNINSTALL_SCRIPT}
|
||||
ynh_replace_string "rm -I" "rm -f" ${UNINSTALL_SCRIPT}
|
||||
# Execute the uninstall script
|
||||
./${UNINSTALL_SCRIPT} --force
|
||||
./${UNINSTALL_SCRIPT} --yes --force --env /opt/netdata/etc/netdata/.environment
|
||||
|
||||
# Remove MySQL netdata user
|
||||
ynh_mysql_execute_as_root "drop user 'netdata'@'localhost'; flush privileges;"
|
||||
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
|
||||
# The following command is kept as a matter of transition with the previous way
|
||||
# of managing dependencies
|
||||
ynh_package_autoremove "netdata-deps" || true
|
||||
|
|
|
@ -54,7 +54,7 @@ then
|
|||
else
|
||||
# Move prefix comment #for-subdir at end of lines
|
||||
ynh_replace_string "#for-subdir\(.*\)" "\1 #for-subdir" $nginx_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -68,7 +68,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
installed_version=$(cat /opt/netdata/etc/netdata/app.src | grep SOURCE_URL | sed "s|.*/v\(.*\)/.*|\1|g")
|
||||
version_to_install=$(cat ../conf/app.src | grep SOURCE_URL | sed "s|.*/v\(.*\)/.*|\1|g")
|
||||
|
||||
if [ "$installed_version" != "$version_to_install" ] ; then
|
||||
if [ "$installed_version" != "$version_to_install" ] ; then
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -90,7 +90,7 @@ if [ "$installed_version" != "$version_to_install" ] ; then
|
|||
tmp=$(mktemp /tmp/netdata-updater-log-XXXXXX.log)
|
||||
# open fd 3 and send it to tmp
|
||||
exec 3>${tmp}
|
||||
|
||||
|
||||
# Launch netdata installation in /opt directory
|
||||
pushd $NETDATA_TMPDIR
|
||||
# Remove previous service definition (specific 1.8.0 upgrade)
|
||||
|
@ -98,10 +98,7 @@ if [ "$installed_version" != "$version_to_install" ] ; then
|
|||
|
||||
./netdata-installer.sh --install /opt --dont-wait >&3 2>&3 || ynh_die "FAILED TO COMPILE/INSTALL NETDATA"
|
||||
|
||||
# Store the uninstaller for the removal script
|
||||
mv ./netdata-uninstaller.sh /opt/netdata/etc/netdata
|
||||
|
||||
popd
|
||||
popd
|
||||
fi
|
||||
|
||||
# Specific configuration
|
||||
|
@ -126,4 +123,3 @@ fi
|
|||
#=================================================
|
||||
|
||||
systemctl reload nginx
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue