1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/domoticz_ynh.git synced 2024-09-03 18:26:17 +02:00

Update logrotate conf

update api label
This commit is contained in:
Krakinou 2022-11-19 13:56:48 +01:00
parent 9a1ed19d67
commit 0469995660
3 changed files with 9 additions and 8 deletions

View file

@ -6,7 +6,7 @@
"en": "Very light weight open sources home automation system that lets you monitor and configure miscellaneous devices", "en": "Very light weight open sources home automation system that lets you monitor and configure miscellaneous devices",
"fr": "Logiciel open sources et gratuit de domotique qui vous permet de configurer un grand nombre d'appareils" "fr": "Logiciel open sources et gratuit de domotique qui vous permet de configurer un grand nombre d'appareils"
}, },
"version": "2020.2~ynh4", "version": "2022.2~ynh5",
"url": "https://www.domoticz.com", "url": "https://www.domoticz.com",
"upstream": { "upstream": {
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",

View file

@ -206,7 +206,7 @@ mkdir -p /var/log/"$app"
chown -R domoticz: /var/log/"$app" chown -R domoticz: /var/log/"$app"
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
ynh_use_logrotate ynh_use_logrotate --logfile="/var/log/$app/$app"
[[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/" [[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/"
#================================================= #=================================================
@ -244,8 +244,8 @@ then
fi fi
#API & MQTT should stay publicly accessible. #API & MQTT should stay publicly accessible.
ynh_permission_create --permission="domoticz_API" --url="$domain$api_path" --allowed="visitors" ynh_permission_create --permission="domoticz_API" --label="api" --url="$domain$api_path" --allowed="visitors" --show_tile="false" --protected="true"
[[ ! -z "$mqtt_domain" ]] && ynh_permission_create --permission="domoticz_MQTT" --url="$mqtt_domain" --allowed="visitors" [[ ! -z "$mqtt_domain" ]] && ynh_permission_create --permission="domoticz_MQTT" --label="MQTT" --url="$mqtt_domain" --allowed="visitors" --show_tile="false" --protected="true"
#================================================= #=================================================

View file

@ -134,7 +134,8 @@ fi
if ! ynh_permission_exists --permission="domoticz_API" if ! ynh_permission_exists --permission="domoticz_API"
then then
# API Authorization with dedicated URL # API Authorization with dedicated URL
ynh_permission_create --permission="domoticz_API" --url="$domain$api_path" --allowed="visitors" ynh_permission_create --permission="domoticz_API" --label="api" --url="$domain$api_path" --allowed="visitors" --show_tile="false" --protected="true"
fi fi
# Create the permission "domoticz_MQTT" only if it doesn't exist. # Create the permission "domoticz_MQTT" only if it doesn't exist.
@ -142,7 +143,7 @@ if [ ! -z "$mqtt_domain" ]; then
if ! ynh_permission_exists --permission="domoticz_MQTT" if ! ynh_permission_exists --permission="domoticz_MQTT"
then then
# API Authorization with dedicated URL # API Authorization with dedicated URL
ynh_permission_create --permission="domoticz_MQTT" --url="$mqtt_domain" --allowed="visitors" ynh_permission_create --permission="domoticz_MQTT" --label="MQTT" --url="$mqtt_domain" --allowed="visitors" --show_tile="false" --protected="true"
fi fi
fi fi
@ -259,7 +260,7 @@ mkdir -p /var/log/"$app"
chown -R domoticz: /var/log/"$app" chown -R domoticz: /var/log/"$app"
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append ynh_use_logrotate --logfile="/var/log/$app/$app" --non-append
[[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/" --non-append [[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/" --non-append