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:
parent
66cc5be9f8
commit
fba6f8e495
1 changed files with 2 additions and 10 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue