#!/bin/bash # ============= FUTURE YUNOHOST HELPER ============= # Delete a file checksum from the app settings # # $app should be defined when calling this helper # # usage: ynh_remove_file_checksum file # | arg: file - The file for which the checksum will be deleted ynh_delete_file_checksum () { local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_' ynh_app_setting_delete $app $checksum_setting_name } #================================================= # Send an email to inform the administrator # # usage: ynh_send_readme_to_admin app_message [recipients] # | arg: -m --app_message= - The message 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" ynh_send_readme_to_admin() { # Declare an array to define the options of this helper. declare -Ar args_array=( [m]=app_message= [r]=recipients= ) local app_message local recipients # Manage arguments with getopts ynh_handle_getopts_args "$@" local app_message="${app_message:-...No specific information...}" local recipients="${recipients:-root}"