From f4a5d9d5dc66e3f8d944e28deaae9019c96ca35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 20 Mar 2024 22:10:03 +0100 Subject: [PATCH] fix: mkdir --- scripts/_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 414f121..875ef50 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -59,9 +59,10 @@ function setup_files() { chown "$app:$app" "/var/log/$app.log" if [ ! -f "$conf_file" ]; then + mkdir -p "$(dirname "$conf_file")" ynh_configure server.conf "$conf_file" chmod 400 "$conf_file" - chown "$app:$app" "$conf_file" + chown -R "$app:$app" "$(dirname "$conf_file")" # Autoinstall the LDAP auth module if [ -f "$install_dir/$appname/$FORKNAME-bin" ]; then