1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00

This is not how the regen conf works

This commit is contained in:
Alexandre Aubin 2020-06-17 15:55:39 +02:00
parent 66cc5be9f8
commit fba6f8e495

View file

@ -43,27 +43,19 @@ then
ynh_script_progression --message="Configuring ssh to add a SFTP access..." --weight=3
cp -R conf/ssh_regenconf_hook /usr/share/yunohost/hooks/conf_regen/90-ssh_$app
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file=/usr/share/yunohost/hooks/conf_regen/90-ssh_$app
yunohost tools regen-conf ssh
else
ynh_script_progression --message="Removing the custom ssh config for the SFTP access..." --weight=3
sed -i "/##-> ${app}/,/##<- ${app}/d" /etc/ssh/sshd_config
# Remove regen-conf hook
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/90-ssh_$app"
fi
yunohost tools regen-conf ssh
# Update the config of the app
ynh_app_setting_set --app=$app --key=with_sftp --value=$with_sftp
#=================================================
# RELOAD SSH
#=================================================
ynh_script_progression --message="Reloading SSH..."
ynh_systemd_action --service_name=ssh --action=reload
#=================================================
# END OF SCRIPT
#=================================================