1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/restic_ynh.git synced 2024-09-03 20:16:22 +02:00
This commit is contained in:
oiseauroch 2024-02-15 22:12:49 +01:00 committed by GitHub
commit 06471be7d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -55,6 +55,7 @@ cat > /tmp/${app}_sudoer << EOSUDOER
${app} ALL = (root) NOPASSWD: /usr/bin/yunohost*, /bin/journalctl*, /usr/bin/find /etc/yunohost/apps -name backup, ${final_path}/check_method_${app}
EOSUDOER
visudo -cf /tmp/${app}_sudoer && mv /tmp/${app}_sudoer /etc/sudoers.d/${app}
chmod 644 /etc/sudoers.d/${app}
#=================================================
# ACTIVATE BACKUP METHODS
@ -158,6 +159,7 @@ Host ${server}
UserKnownHostsFile /dev/null
# end $app ssh config
EOCONF
chmod 700 ${ssh_dir}/config
#=================================================
# Display key

View file

@ -76,6 +76,7 @@ cat > /tmp/${app}_sudoer << EOSUDOER
${app} ALL = (root) NOPASSWD: /usr/bin/yunohost*, /bin/journalctl*, /usr/bin/find /etc/yunohost/apps -name backup, ${final_path}/check_method_${app}
EOSUDOER
visudo -cf /tmp/${app}_sudoer && mv /tmp/${app}_sudoer /etc/sudoers.d/${app}
chmod 644 /etc/sudoers.d/${app}
ynh_script_progression --message="Move ssh keys from root to ${app} user's home"
ynh_script_progression --message="Generate ssh config"
set +o errexit
@ -98,6 +99,7 @@ if [ "$missing_conf" -eq "1" ];then
UserKnownHostsFile /dev/null
# end $app ssh config
EOCONF
chmod 700 ${ssh_dir}/config
fi
chown -R ${app}: /home/${app}