diff --git a/conf/nginx.conf b/conf/nginx.conf
index 3f4d62f..bab9d95 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -2,7 +2,7 @@
location __PATH__/ {
# Path to source
- alias __FINALPATH__/www/;
+ alias __FINALPATH__/;
# Force usage of https
if ($scheme = http) {
@@ -10,7 +10,7 @@ location __PATH__/ {
}
# Default indexes and catch-all
- index index.html index.php;
+ index tinyfilemanager.php;
try_files $uri $uri/ __PATH__/index.php?$args;
# Prevent useless logs
diff --git a/manifest.json b/manifest.json
index eb4576a..08bf5c6 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
- "id": "my_webapp",
- "name": "Custom Webapp",
+ "id": "tiny_file_manager",
+ "name": "Tiny File Manager",
"packaging_format": 1,
"description": {
"en": "Custom Web app with SFTP access",
@@ -23,51 +23,31 @@
"multi_instance": true,
"services": [
"nginx",
- "php7.3-fpm",
- "mysql"
+ "php7.3-fpm"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
- "example": "domain.org"
+ "example": "domain.org",
+ "default": "tfm.yntest.weblibre.ca"
},
{
"name": "path",
"type": "path",
"example": "/site",
- "default": "/site"
+ "default": "/"
},
- {
- "name": "with_sftp",
- "type": "boolean",
- "ask": {
- "en": "Do you need a SFTP access?",
- "fr": "Avez-vous besoin d'un accès SFTP ?"
- },
- "default": true
- },
- {
- "name": "password",
- "type": "password",
- "optional": true,
- "example": "myreallystrengthpassword"
- },
- {
- "name": "is_public",
- "type": "boolean",
- "default": true
- },
- {
- "name": "with_mysql",
- "type": "boolean",
- "ask": {
- "en": "Do you need a MySQL database?",
- "fr": "Avez-vous besoin d'une base de données MySQL ?"
- },
- "default": false
- }
+ {
+ "name": "user",
+ "type": "user",
+ "ask": {
+ "en": "Choose the WordPress administrator (must be an existing YunoHost user)",
+ "fr": "Administrateur du site (doit être un utilisateur YunoHost existant)"
+ },
+ "example": "john"
+ }
]
}
}
diff --git a/scripts/_common.sh b/scripts/_common.sh
index f5c876d..4f459fe 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -4,366 +4,4 @@
# COMMON VARIABLES
#=================================================
-YNH_PHP_VERSION="7.3"
-
-#=================================================
-# EXPERIMENTAL HELPERS
-#=================================================
-
-# Send an email to inform the administrator
-#
-# usage: ynh_send_readme_to_admin --app_message=app_message [--recipients=recipients] [--type=type]
-# | arg: -m --app_message= - The file with the content to send to the administrator.
-# | arg: -r, --recipients= - The recipients of this email. Use spaces to separate multiples recipients. - default: root
-# example: "root admin@domain"
-# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you
-# example: "root admin@domain user1 user2"
-# | arg: -t, --type= - Type of mail, could be 'backup', 'change_url', 'install', 'remove', 'restore', 'upgrade'
-ynh_send_readme_to_admin() {
- # Declare an array to define the options of this helper.
- declare -Ar args_array=( [m]=app_message= [r]=recipients= [t]=type= )
- local app_message
- local recipients
- local type
- # Manage arguments with getopts
-
- ynh_handle_getopts_args "$@"
- app_message="${app_message:-}"
- recipients="${recipients:-root}"
- type="${type:-install}"
-
- # Get the value of admin_mail_html
- admin_mail_html=$(ynh_app_setting_get $app admin_mail_html)
- admin_mail_html="${admin_mail_html:-0}"
-
- # Retrieve the email of users
- find_mails () {
- local list_mails="$1"
- local mail
- local recipients=" "
- # Read each mail in argument
- for mail in $list_mails
- do
- # Keep root or a real email address as it is
- if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@"
- then
- recipients="$recipients $mail"
- else
- # But replace an user name without a domain after by its email
- if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null)
- then
- recipients="$recipients $mail"
- fi
- fi
- done
- echo "$recipients"
- }
- recipients=$(find_mails "$recipients")
-
- # Subject base
- local mail_subject="☁️🆈🅽🅷☁️: \`$app\`"
-
- # Adapt the subject according to the type of mail required.
- if [ "$type" = "backup" ]; then
- mail_subject="$mail_subject has just been backup."
- elif [ "$type" = "change_url" ]; then
- mail_subject="$mail_subject has just been moved to a new URL!"
- elif [ "$type" = "remove" ]; then
- mail_subject="$mail_subject has just been removed!"
- elif [ "$type" = "restore" ]; then
- mail_subject="$mail_subject has just been restored!"
- elif [ "$type" = "upgrade" ]; then
- mail_subject="$mail_subject has just been upgraded!"
- else # install
- mail_subject="$mail_subject has just been installed!"
- fi
-
- local mail_message="This is an automated message from your beloved YunoHost server.
-
-Specific information for the application $app.
-
-$(if [ -n "$app_message" ]
-then
- cat "$app_message"
-else
- echo "...No specific information..."
-fi)
-
----
-Automatic diagnosis data from YunoHost
-
-__PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')__PRE_TAG2__"
-
- # Store the message into a file for further modifications.
- echo "$mail_message" > mail_to_send
-
- # If a html email is required. Apply html tags to the message.
- if [ "$admin_mail_html" -eq 1 ]
- then
- # Insert 'br' tags at each ending of lines.
- ynh_replace_string "$" "
" mail_to_send
-
- # Insert starting HTML tags
- sed --in-place '1s@^@\n\n
" mail_to_send
- ynh_replace_string "__PRE_TAG2__" "<\pre>" mail_to_send
-
- # Insert finishing HTML tags
- echo -e "\n\n" >> mail_to_send
-
- # Otherwise, remove tags to keep a plain text.
- else
- # Remove URL tags
- ynh_replace_string "__URL_TAG[1,3]__" "" mail_to_send
- ynh_replace_string "__URL_TAG2__" ": " mail_to_send
-
- # Remove PRE tags
- ynh_replace_string "__PRE_TAG[1-2]__" "" mail_to_send
- fi
-
- # Define binary to use for mail command
- if [ -e /usr/bin/bsd-mailx ]
- then
- local mail_bin=/usr/bin/bsd-mailx
- else
- local mail_bin=/usr/bin/mail.mailutils
- fi
-
- if [ "$admin_mail_html" -eq 1 ]
- then
- content_type="text/html"
- else
- content_type="text/plain"
- fi
-
- # Send the email to the recipients
- cat mail_to_send | $mail_bin -a "Content-Type: $content_type; charset=UTF-8" -s "$mail_subject" "$recipients"
-}
-
-#=================================================
-
-ynh_maintenance_mode_ON () {
- # Load value of $path_url and $domain from the config if their not set
- if [ -z $path_url ]; then
- path_url=$(ynh_app_setting_get $app path)
- fi
- if [ -z $domain ]; then
- domain=$(ynh_app_setting_get $app domain)
- fi
-
- mkdir -p /var/www/html/
-
- # Create an html to serve as maintenance notice
- echo "
-
-
-
-Your app $app is currently under maintenance!
-
-
-
-Your app $app is currently under maintenance!
-This app has been put under maintenance by your administrator at $(date)
-Please wait until the maintenance operation is done. This page will be reloaded as soon as your app will be back.
-
-
-" > "/var/www/html/maintenance.$app.html"
-
- # Create a new nginx config file to redirect all access to the app to the maintenance notice instead.
- echo "# All request to the app will be redirected to ${path_url}_maintenance and fall on the maintenance notice
-rewrite ^${path_url}/(.*)$ ${path_url}_maintenance/? redirect;
-# Use another location, to not be in conflict with the original config file
-location ${path_url}_maintenance/ {
-alias /var/www/html/ ;
-
-try_files maintenance.$app.html =503;
-
-# Include SSOWAT user panel.
-include conf.d/yunohost_panel.conf.inc;
-}" > "/etc/nginx/conf.d/$domain.d/maintenance.$app.conf"
-
- # The current config file will redirect all requests to the root of the app.
- # To keep the full path, we can use the following rewrite rule:
- # rewrite ^${path_url}/(.*)$ ${path_url}_maintenance/\$1? redirect;
- # The difference will be in the $1 at the end, which keep the following queries.
- # But, if it works perfectly for a html request, there's an issue with any php files.
- # This files are treated as simple files, and will be downloaded by the browser.
- # Would be really be nice to be able to fix that issue. So that, when the page is reloaded after the maintenance, the user will be redirected to the real page he was.
-
- systemctl reload nginx
-}
-
-ynh_maintenance_mode_OFF () {
- # Load value of $path_url and $domain from the config if their not set
- if [ -z $path_url ]; then
- path_url=$(ynh_app_setting_get $app path)
- fi
- if [ -z $domain ]; then
- domain=$(ynh_app_setting_get $app domain)
- fi
-
- # Rewrite the nginx config file to redirect from ${path_url}_maintenance to the real url of the app.
- echo "rewrite ^${path_url}_maintenance/(.*)$ ${path_url}/\$1 redirect;" > "/etc/nginx/conf.d/$domain.d/maintenance.$app.conf"
- systemctl reload nginx
-
- # Sleep 4 seconds to let the browser reload the pages and redirect the user to the app.
- sleep 4
-
- # Then remove the temporary files used for the maintenance.
- rm "/var/www/html/maintenance.$app.html"
- rm "/etc/nginx/conf.d/$domain.d/maintenance.$app.conf"
-
- systemctl reload nginx
-}
-
-#=================================================
-
-# Create a changelog for an app after an upgrade from the file CHANGELOG.md.
-#
-# usage: ynh_app_changelog [--format=markdown/html/plain] [--output=changelog_file] --changelog=changelog_source]
-# | arg: -f --format= - Format in which the changelog will be printed
-# markdown: Default format.
-# html: Turn urls into html format.
-# plain: Plain text changelog
-# | arg: -o --output= - Output file for the changelog file (Default ./changelog)
-# | arg: -c --changelog= - CHANGELOG.md source (Default ../CHANGELOG.md)
-#
-# The changelog is printed into the file ./changelog and ./changelog_lite
-ynh_app_changelog () {
- # Declare an array to define the options of this helper.
- local legacy_args=foc
- declare -Ar args_array=( [f]=format= [o]=output= [c]=changelog= )
- local format
- local output
- local changelog
- # Manage arguments with getopts
- ynh_handle_getopts_args "$@"
- format=${format:-markdown}
- output=${output:-changelog}
- changelog=${changelog:-../CHANGELOG.md}
-
- local original_changelog="$changelog"
- local temp_changelog="changelog_temp"
- local final_changelog="$output"
-
- if [ ! -n "$original_changelog" ]
- then
- echo "No changelog available..." > "$final_changelog"
- echo "No changelog available..." > "${final_changelog}_lite"
- return 0
- fi
-
- local current_version=$(ynh_read_manifest --manifest="/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json" --manifest_key="version")
- local update_version=$(ynh_read_manifest --manifest="../manifest.json" --manifest_key="version")
-
- # Get the line of the version to update to into the changelog
- local update_version_line=$(grep --max-count=1 --line-number "^## \[$update_version" "$original_changelog" | cut -d':' -f1)
- # If there's no entry for this version yet into the changelog
- # Get the first available version
- if [ -z "$update_version_line" ]
- then
- update_version_line=$(grep --max-count=1 --line-number "^##" "$original_changelog" | cut -d':' -f1)
- fi
-
- # Get the length of the complete changelog.
- local changelog_length=$(wc --lines "$original_changelog" | awk '{print $1}')
- # Cut the file before the version to update to.
- tail --lines=$(( $changelog_length - $update_version_line + 1 )) "$original_changelog" > "$temp_changelog"
-
- # Get the length of the troncated changelog.
- changelog_length=$(wc --lines "$temp_changelog" | awk '{print $1}')
- # Get the line of the current version into the changelog
- # Keep only the last line found
- local current_version_line=$(grep --line-number "^## \[$current_version" "$temp_changelog" | cut -d':' -f1 | tail --lines=1)
- # If there's no entry for this version into the changelog
- # Get the last available version
- if [ -z "$current_version_line" ]
- then
- current_version_line=$(grep --line-number "^##" "$original_changelog" | cut -d':' -f1 | tail --lines=1)
- fi
- # Cut the file before the current version.
- # Then grep the previous version into the changelog to get the line number of the previous version
- local previous_version_line=$(tail --lines=$(( $changelog_length - $current_version_line )) \
- "$temp_changelog" | grep --max-count=1 --line-number "^## " | cut -d':' -f1)
- # If there's no previous version into the changelog
- # Go until the end of the changelog
- if [ -z "$previous_version_line" ]
- then
- previous_version_line=$changelog_length
- fi
-
- # Cut the file after the previous version to keep only the changelog between the current version and the version to update to.
- head --lines=$(( $current_version_line + $previous_version_line - 1 )) "$temp_changelog" | tee "$final_changelog"
-
- if [ "$format" = "html" ]
- then
- # Replace markdown links by html links
- ynh_replace_string --match_string="\[\(.*\)\](\(.*\)))" --replace_string="\1)" --target_file="$final_changelog"
- ynh_replace_string --match_string="\[\(.*\)\](\(.*\))" --replace_string="\1" --target_file="$final_changelog"
- elif [ "$format" = "plain" ]
- then
- # Change title format.
- ynh_replace_string --match_string="^##.*\[\(.*\)\](\(.*\)) - \(.*\)$" --replace_string="## \1 (\3) - \2" --target_file="$final_changelog"
- # Change modifications lines format.
- ynh_replace_string --match_string="^\([-*]\).*\[\(.*\)\]\(.*\)" --replace_string="\1 \2 \3" --target_file="$final_changelog"
- fi
- # else markdown. As the file is already in markdown, nothing to do.
-
- # Keep only important changes into the changelog
- # Remove all minor changes
- sed '/^-/d' "$final_changelog" > "${final_changelog}_lite"
- # Remove all blank lines (to keep a clear workspace)
- sed --in-place '/^$/d' "${final_changelog}_lite"
- # Add a blank line at the end
- echo "" >> "${final_changelog}_lite"
-
- # Clean titles if there's no significative changes
- local line
- local previous_line=""
- while read line <&3
- do
- if [ -n "$previous_line" ]
- then
- # Remove the line if it's a title or a blank line, and the previous one was a title as well.
- if ( [ "${line:0:1}" = "#" ] || [ ${#line} -eq 0 ] ) && [ "${previous_line:0:1}" = "#" ]
- then
- ynh_replace_special_string --match_string="${previous_line//[/.}" --replace_string="" --target_file="${final_changelog}_lite"
- fi
- fi
- previous_line="$line"
- done 3< "${final_changelog}_lite"
-
- # Remove all blank lines again
- sed --in-place '/^$/d' "${final_changelog}_lite"
-
- # Restore changelog format with blank lines
- ynh_replace_string --match_string="^##.*" --replace_string="\n\n&\n" --target_file="${final_changelog}_lite"
- # Remove the 2 first blank lines
- sed --in-place '1,2d' "${final_changelog}_lite"
- # Add a blank line at the end
- echo "" >> "${final_changelog}_lite"
-
- # If changelog are empty, add an info
- if [ $(wc --words "$final_changelog" | awk '{print $1}') -eq 0 ]
- then
- echo "No changes from the changelog..." > "$final_changelog"
- fi
- if [ $(wc --words "${final_changelog}_lite" | awk '{print $1}') -eq 0 ]
- then
- echo "No significative changes from the changelog..." > "${final_changelog}_lite"
- fi
-}
+YNH_PHP_VERSION="7.3"
\ No newline at end of file
diff --git a/scripts/install b/scripts/install
index adfaf91..6f114c4 100644
--- a/scripts/install
+++ b/scripts/install
@@ -22,14 +22,9 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
-with_sftp=$YNH_APP_ARG_WITH_SFTP
-password=$YNH_APP_ARG_PASSWORD
-is_public=$YNH_APP_ARG_IS_PUBLIC
-
-with_mysql=$YNH_APP_ARG_WITH_MYSQL
+user=$YNH_APP_ARG_USER
app=$YNH_APP_INSTANCE_NAME
-app_nb=$YNH_APP_INSTANCE_NUMBER
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
@@ -49,27 +44,12 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
-ynh_app_setting_set --app=$app --key=with_mysql --value=$with_mysql
-ynh_app_setting_set --app=$app --key=with_sftp --value=$with_sftp
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
ynh_app_setting_set --app=$app --key=admin_mail_html --value=1
#=================================================
# STANDARD MODIFICATIONS
-#=================================================
-# CREATE A MYSQL DATABASE
-#=================================================
-
-if [ $with_mysql -eq 1 ]
-then
- ynh_script_progression --message="Creating a MySQL database..." --weight=2
-
- db_name=$(ynh_sanitize_dbid --db_name=$app)
- ynh_app_setting_set --app=$app --key=db_name --value=$db_name
- ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
-fi
-
#=================================================
# NGINX CONFIGURATION
#=================================================
@@ -83,21 +63,7 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Configuring system user..."
-if [ $with_sftp -eq 1 ]
-then
- groups="sftp.app"
-else
- groups=""
-fi
-
-ynh_system_user_create --username=$app --home_dir="$final_path" --groups="$groups"
-
-if [ $with_sftp -eq 1 ]
-then
- # Add the password to this user
- chpasswd <<< "${app}:${password}"
- ynh_app_setting_set --app=$app --key=password --value="$password"
-fi
+ynh_system_user_create --username=$app
#=================================================
# SPECIFIC SETUP
@@ -105,34 +71,63 @@ fi
# MODIFY A CONFIG FILE
#=================================================
-mkdir -p "$final_path/www"
+mkdir "$final_path"
+
+git clone https://github.com/prasathmani/tinyfilemanager.git "$final_path"
+
+cp $final_path/config-sample.php $final_path/config.php
+
+ynh_replace_string --match_string="\$use_auth = true;" --replace_string="\$use_auth = false;" --target_file=$final_path/config.php
+ynh_replace_string --match_string="\$default_timezone = 'Etc/UTC'; // UTC" --replace_string="\$default_timezone = 'America/Toronto';" --target_file=$final_path/config.php
+ynh_replace_string --match_string="\$root_path = \$_SERVER\['DOCUMENT_ROOT'\];" --replace_string="\$root_path = '/var/www';" --target_file=$final_path/config.php
+ynh_replace_string --match_string="\$max_upload_size_bytes = 5000;" --replace_string="\$max_upload_size_bytes = 5000000;" --target_file=$final_path/config.php
+
+chown -R $app: "$final_path"
+
+ynh_package_install proftpd-mod-ldap
+
+echo "
+ LDAPServer ldap://localhost/??sub
+ LDAPUsers ou=users,dc=yunohost,dc=org (uid=%u)
+
+
+PassivePorts 50000 50100
-if [ $with_sftp -eq 1 ]
-then
+
+ TLSEngine on
+ TLSLog /var/log/proftpd/tls.log
+ TLSProtocol SSLv23
+ TLSRSACertificateFile /etc/yunohost/certs/$domain/crt.pem
+ TLSRSACertificateKeyFile /etc/yunohost/certs/$domain/key.pem
+ TLSVerifyClient off
+ TLSOptions NoSessionReuseRequired
+ TLSRequired on
+ " > /etc/proftpd/conf.d/yunohost.conf
- ynh_add_config --template="../sources/www/index.html" --destination="$final_path/www/index.html"
+systemctl restart proftpd
-else
- # Copy files to the right place
- cp "../sources/www/index_no_sftp.html" "$final_path/www/index.html"
-fi
+yunohost firewall allow TCP 21
+yunohost firewall allow TCP 50000:50100
-if [ $with_mysql -eq 1 ]; then
- # Store the database access
- echo -e "# MySQL Database
-name: ${db_name}\nuser: ${db_name}\npass: ${db_pwd}" > ../sources/db_access.txt
+# Allow app to browse content of /var/www
+setfacl -m g:$app:rx /var/www
+setfacl -m g:$app.main:rx /var/www
- # Copy files to the right place
- cp -r "../sources/db_access.txt" "$final_path/db_access.txt"
-fi
+#=================================================
+# 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
-chown -R $app:www-data "$final_path"
-# Home directory of the user needs to be owned by root to allow
-# SFTP connections
-chown root:root "$final_path"
-setfacl -m g:$app:r-x "$final_path"
-setfacl -m g:www-data:r-x "$final_path"
-chmod o-rwx "$final_path"
+# Automatically add link to www folder to new users
+ln -s /var/www /etc/skel/www
#=================================================
# PHP-FPM CONFIGURATION
@@ -148,13 +143,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# SETUP SSOWAT
#=================================================
-ynh_script_progression --message="Configuring permissions..."
+ynh_script_progression --message="Configuring permissions..." --weight=1
-# Make app public if necessary
-if [ $is_public -eq 1 ]
-then
- ynh_permission_update --permission="main" --add="visitors"
-fi
+ynh_permission_update --permission="main" --remove=all_users
+
+ynh_permission_update --permission="main" --add=$user
#=================================================
# RELOAD NGINX
@@ -163,46 +156,6 @@ ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload
-#=================================================
-# SEND A README FOR THE ADMIN
-#=================================================
-
-# Get main domain and buid the url of the admin panel of the app.
-admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
-
-if [ $with_mysql -eq 1 ]
-then
- sql_infos="
-You've asked for a database, please find here the information about this SQL database.
-$(cat "$final_path/db_access.txt")
-"
-else
- sql_infos=""
-fi
-
-if [ $with_sftp -eq 1 ]
-then
- sftp_infos="You can connect to this repository by using SFTP with the following credentials.
-Domain: $domain
-Port: $(grep "^Port" /etc/ssh/sshd_config | awk '{print $2}')
-User: $app
-Password: The one you set at installation."
-else
- sftp_infos=""
-fi
-
-echo "This app is simply a blank web app container. You have to put your own app inside.
-$sql_infos
-Please put your files into this directory: $final_path/www/
-$sftp_infos
-
-You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__.
-You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__.
-
-If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/my_webapp_ynh__URL_TAG3__." > mail_to_send
-
-ynh_send_readme_to_admin --app_message="mail_to_send" --recipients=root --type=install
-
#=================================================
# END OF SCRIPT
#=================================================
diff --git a/scripts/remove b/scripts/remove
index e9952b0..645aac4 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -26,17 +26,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# STANDARD REMOVE
-#=================================================
-# REMOVE THE MYSQL DATABASE
-#=================================================
-
-if [ $with_mysql -eq 1 ]; then
- ynh_script_progression --message="Removing the MySQL database..." --weight=2
-
- # Remove a database if it exists, along with the associated user
- ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
-fi
-
#=================================================
# REMOVE APP MAIN DIR
#=================================================
@@ -65,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
#=================================================