mirror of
https://github.com/YunoHost-Apps/limesurvey_ynh.git
synced 2024-09-03 19:36:32 +02:00
Merge pull request #40 from Jibec/patch-1
upgrade ynh_send_readme_to_admin helper
This commit is contained in:
commit
b8b13cc193
1 changed files with 13 additions and 1 deletions
|
@ -287,14 +287,26 @@ ynh_send_readme_to_admin() {
|
||||||
local mail_subject="☁️🆈🅽🅷☁️: \`$app\` was just installed!"
|
local mail_subject="☁️🆈🅽🅷☁️: \`$app\` was just installed!"
|
||||||
|
|
||||||
local mail_message="This is an automated message from your beloved YunoHost server.
|
local mail_message="This is an automated message from your beloved YunoHost server.
|
||||||
|
|
||||||
Specific information for the application $app.
|
Specific information for the application $app.
|
||||||
|
|
||||||
$app_message
|
$app_message
|
||||||
|
|
||||||
---
|
---
|
||||||
Automatic diagnosis data from YunoHost
|
Automatic diagnosis data from YunoHost
|
||||||
|
|
||||||
$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')"
|
$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# Send the email to the recipients
|
# Send the email to the recipients
|
||||||
echo "$mail_message" | mail -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
|
echo "$mail_message" | $mail_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exit without error if the package is up to date
|
# Exit without error if the package is up to date
|
||||||
|
|
Loading…
Reference in a new issue