diff --git a/scripts/install b/scripts/install index 1f8f866..6f114c4 100644 --- a/scripts/install +++ b/scripts/install @@ -113,6 +113,19 @@ yunohost firewall allow TCP 50000:50100 setfacl -m g:$app:rx /var/www setfacl -m g:$app.main:rx /var/www +#================================================= +# GENERATE GLOBAL SSH KEY +#================================================= + +ssh-keygen -t ed25519 -f /etc/yunohost/sshkey -q -N "" +chmod 600 /etc/yunohost/sshkey +setfacl -m g:$app.main:x /etc/yunohost +setfacl -m g:$app.main:r /etc/yunohost/sshkey +chown daemon /etc/yunohost/sshkey + +ssh-keyscan github.com >> /etc/ssh/known_hosts +grep -qF 'GlobalKnownHostsFile /etc/ssh/known_hosts' /etc/ssh/ssh_config || echo ' GlobalKnownHostsFile /etc/ssh/known_hosts' >> /etc/ssh/ssh_config + # Automatically add link to www folder to new users ln -s /var/www /etc/skel/www diff --git a/scripts/remove b/scripts/remove index 53ab6aa..645aac4 100644 --- a/scripts/remove +++ b/scripts/remove @@ -54,6 +54,14 @@ ynh_remove_fpm_config # SPECIFIC REMOVE #================================================= +# Firewall + +yunohost firewall disallow TCP 21 +yunohost firewall disallow TCP 50000:50100 + +rm /etc/skel/www +rm /etc/yunohost/sshkey* + #================================================= # GENERIC FINALIZATION #=================================================