1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/netdata_ynh.git synced 2024-09-03 19:46:33 +02:00

Set the instance as its own registry (closes #11 and #14)

This commit is contained in:
Jimmy Monin 2018-01-18 20:19:47 +01:00
parent 1701fcbdb7
commit 07b42d219a
2 changed files with 10 additions and 0 deletions

View file

@ -8,6 +8,12 @@ pkg_dependencies="zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autoconf-
# Configure NetData
configure_netdata() {
# Set server as registry serveur
sed -i "/^\[registry\]$/,/^\[/ {
s/# enabled = no/enabled = yes/
s@# registry to announce = https://registry.my-netdata.io@registry to announce = https://$domain$path_url@
}" /opt/netdata/etc/netdata/netdata.conf
# Add a web_log entry for every YunoHost domain
netdata_add_yunohost_web_logs

View file

@ -83,6 +83,10 @@ then
fi
# Calculate and store the nginx config file checksum
ynh_store_file_checksum "$nginx_conf_path"
# Change registry link
ynh_replace_string "registry to announce = https://$old_domain$old_path" "registry to announce = https://$new_domain$new_path" /opt/netdata/etc/netdata/netdata.conf
systemctl restart netdata
fi
# Change the domain for nginx