mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
logs: remove the intermediate useless 'categories' directory, this is triggering me so much
This commit is contained in:
parent
902e65f9bc
commit
2d42f59377
2 changed files with 9 additions and 4 deletions
|
@ -218,6 +218,13 @@ do_post_regen() {
|
|||
chown ynh-portal:root /var/log/yunohost-portalapi.log
|
||||
chmod 600 /var/log/yunohost-portalapi.log
|
||||
|
||||
# Legacy log tree structure
|
||||
if [ ! -e /var/log/yunohost/operations ] && [ -d /var/log/yunohost/categories/operation ] && [ ! -L /var/log/yunohost/categories/operation ]
|
||||
then
|
||||
mv /var/log/yunohost/categories/operation /var/log/yunohost/operations
|
||||
ln -s /var/log/yunohost/operations /var/log/yunohost/categories/operation
|
||||
fi
|
||||
|
||||
######################
|
||||
# Enfore permissions #
|
||||
######################
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#
|
||||
# Copyright (c) 2024 YunoHost Contributors
|
||||
#
|
||||
# This file is part of YunoHost (see https://yunohost.org)
|
||||
|
@ -36,8 +35,7 @@ from moulinette.utils.filesystem import read_file, read_yaml
|
|||
|
||||
logger = getLogger("yunohost.log")
|
||||
|
||||
CATEGORIES_PATH = "/var/log/yunohost/categories/"
|
||||
OPERATIONS_PATH = "/var/log/yunohost/categories/operation/"
|
||||
OPERATIONS_PATH = "/var/log/yunohost/operations/"
|
||||
METADATA_FILE_EXT = ".yml"
|
||||
LOG_FILE_EXT = ".log"
|
||||
|
||||
|
@ -214,7 +212,7 @@ def log_show(
|
|||
infos = {}
|
||||
|
||||
# If it's a unit operation, display the name and the description
|
||||
if base_path.startswith(CATEGORIES_PATH):
|
||||
if base_path.startswith(OPERATIONS_PATH):
|
||||
infos["description"] = _get_description_from_name(base_filename)
|
||||
infos["name"] = base_filename
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue