mirror of
https://github.com/YunoHost-Apps/netdata_ynh.git
synced 2024-09-03 19:46:33 +02:00
Adapt to new configuration folder structure
This commit is contained in:
parent
60d782388c
commit
94cc1787bd
1 changed files with 9 additions and 2 deletions
|
@ -51,6 +51,9 @@ touch /opt/netdata/etc/netdata/.opt-out-from-anonymous-statistics
|
||||||
# Add a web_log entry for every YunoHost domain
|
# Add a web_log entry for every YunoHost domain
|
||||||
netdata_add_yunohost_web_logs () {
|
netdata_add_yunohost_web_logs () {
|
||||||
local web_log_file="/opt/netdata/etc/netdata/python.d/web_log.conf"
|
local web_log_file="/opt/netdata/etc/netdata/python.d/web_log.conf"
|
||||||
|
if [ ! -f $web_log_file ] ; then
|
||||||
|
cp /opt/netdata/etc/netdata/orig/python.d/web_log.conf $web_log_file
|
||||||
|
fi
|
||||||
if [ -z "$(grep "YUNOHOST" $web_log_file)" ] ; then
|
if [ -z "$(grep "YUNOHOST" $web_log_file)" ] ; then
|
||||||
echo "# ------------YUNOHOST DOMAINS---------------" >> $web_log_file
|
echo "# ------------YUNOHOST DOMAINS---------------" >> $web_log_file
|
||||||
for domain in $(yunohost domain list --output-as plain); do
|
for domain in $(yunohost domain list --output-as plain); do
|
||||||
|
@ -67,8 +70,12 @@ EOF
|
||||||
|
|
||||||
# If PostgreSQL is installed, add a PostgreSQL entry using instance password
|
# If PostgreSQL is installed, add a PostgreSQL entry using instance password
|
||||||
netdata_add_yunohost_postgres_configuration () {
|
netdata_add_yunohost_postgres_configuration () {
|
||||||
if [ -f /etc/yunohost/psql ] && [ -z "$(grep "yunohost:" /opt/netdata/etc/netdata/python.d/postgres.conf)" ] ; then
|
local postgres_file="/opt/netdata/etc/netdata/python.d/postgres.conf"
|
||||||
cat >> /opt/netdata/etc/netdata/python.d/postgres.conf <<EOF
|
if [ ! -f $postgres_file ] ; then
|
||||||
|
cp /opt/netdata/etc/netdata/orig/python.d/postgres.conf $postgres_file
|
||||||
|
fi
|
||||||
|
if [ -f /etc/yunohost/psql ] && [ -z "$(grep "yunohost:" $postgres_file)" ] ; then
|
||||||
|
cat >> $postgres_file <<EOF
|
||||||
yunohost:
|
yunohost:
|
||||||
name : 'local'
|
name : 'local'
|
||||||
database : 'postgres'
|
database : 'postgres'
|
||||||
|
|
Loading…
Add table
Reference in a new issue