From 8aee337d0f18f77876e539a3a2b96e8d21f39546 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 30 Oct 2023 17:04:17 +0100 Subject: [PATCH] regenconf/portal: fix attempt to chown before the user is created --- hooks/conf_regen/01-yunohost | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index 3b810de30..74331edc2 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -29,11 +29,6 @@ do_init_regen() { chown -R root:ssl-cert /etc/yunohost/certs chmod 750 /etc/yunohost/certs - # Portal folder - mkdir -p /etc/yunohost/portal - chmod 500 /etc/yunohost/portal - chown ynh-portal:ynh-portal /etc/yunohost/portal - # App folders mkdir -p /etc/yunohost/apps chmod 700 /etc/yunohost/apps @@ -72,6 +67,12 @@ do_init_regen() { chown ynh-portal:root /etc/yunohost/.ssowat_cookie_secret chmod 400 /etc/yunohost/.ssowat_cookie_secret + # Portal folder + mkdir -p /etc/yunohost/portal + chmod 500 /etc/yunohost/portal + chown ynh-portal:ynh-portal /etc/yunohost/portal + + # YunoHost services cp yunohost-api.service /etc/systemd/system/yunohost-api.service cp yunohost-portal-api.service /etc/systemd/system/yunohost-portal-api.service cp yunohost-firewall.service /etc/systemd/system/yunohost-firewall.service