我在wordpress更新脚本中运行以下命令
#!/bin/bash
sudo wp cli update
sudo chmod 644 /var/www/example.com/public_html/wp-root-dir/wp-config.php;
sudo chmod -R 777 /var/www/example.com/public_html/wp-root-dir;
wp plugin update --all --path=/var/www/example.com/public_html/wp-root-dir;
wp theme update-all --path=/var/www/example.com/public_html/wp-root-dir;
wp core update --path=/var/www/example.com/public_html/wp-root-dir;
sudo chmod -R 755 /var/www/example.com/public_html/wp-root-dir
我将我的cron作业设置为每天3:05am
运行
5 3 * * * /home/ubuntu/update.sh | mail -s "Wordpress Has been updated" myemail@email.com
但是当我收到电子邮件时,我只收到以下消息:
Success: WP-CLI is at the latest version.
但我应该收到更多信息:
Success: WP-CLI is at the latest version.
Success: Plugin already updated.
Success: WordPress is up to date.
以上是我运行./update.sh
当我的工作运行时,我的命令是否正在执行,如果是,我怎样才能将所有输出消息通过电子邮件发送给我?