Преглед на файлове

fix: sudoers — ynh_config_add_sudoers inexistant, retour à ynh_config_add + chmod 440

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cédric Hansen преди 1 ден
родител
ревизия
4556272939
променени са 3 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 2 1
      scripts/install
  2. 2 1
      scripts/restore
  3. 2 1
      scripts/upgrade

+ 2 - 1
scripts/install

@@ -31,7 +31,8 @@ chmod 600 "$install_dir/config.py"
 chmod 700 "$data_dir/keys"
 
 ynh_script_progression "Ajout des règles sudo..."
-ynh_config_add_sudoers
+ynh_config_add --template="sudoers" --destination="/etc/sudoers.d/$app"
+chmod 440 "/etc/sudoers.d/$app"
 
 ynh_script_progression "Configuration du service systemd..."
 ynh_config_add_systemd

+ 2 - 1
scripts/restore

@@ -12,7 +12,8 @@ chmod 600 "$install_dir/config.py"
 chmod 700 "$data_dir/keys"
 
 ynh_script_progression "Restauration des règles sudo..."
-ynh_config_add_sudoers
+ynh_config_add --template="sudoers" --destination="/etc/sudoers.d/$app"
+chmod 440 "/etc/sudoers.d/$app"
 
 ynh_script_progression "Restauration du service systemd..."
 ynh_config_add_systemd

+ 2 - 1
scripts/upgrade

@@ -23,7 +23,8 @@ chown -R "$app:$app" "$install_dir" "$data_dir"
 chmod 600 "$install_dir/config.py"
 
 ynh_script_progression "Mise à jour des règles sudo..."
-ynh_config_add_sudoers
+ynh_config_add --template="sudoers" --destination="/etc/sudoers.d/$app"
+chmod 440 "/etc/sudoers.d/$app"
 
 ynh_script_progression "Mise à jour systemd et nginx..."
 ynh_config_add_systemd