From 5f118d7e92f2aff24165d1c4b905ae6146f5c92f Mon Sep 17 00:00:00 2001 From: Shreyas A S <137637016+shreyas-a-s@users.noreply.github.com> Date: Sat, 6 Jan 2024 00:45:10 +0530 Subject: [PATCH] Create an error log along with total log file --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index d901d81..8939ce8 100755 --- a/install.sh +++ b/install.sh @@ -31,10 +31,10 @@ printf -- "\n-----------------------------------------\ \nONECLICK WEBSITE DEPLOYER LOG\ \n$(date)\ \n-----------------------------------------\ -\n" >> ~/oneclick-website-deployer.log +\n" >> ~/oneclick-website-deployer.log >> ~/oneclick-website-deployer-errors.log -# Redirect both stdout and stderr to log file yet display all output in the terminal -exec > >(tee -a ~/oneclick-website-deployer.log) 2>&1 +# Redirect stdout to one log file and stderr to another +exec > >(tee -a ~/oneclick-website-deployer.log) 2>&1 2> >(tee -a ~/error_output.txt >&2) # Define web root folder export DRUPAL_HOME=/var/www/html