diff --git a/install.sh b/install.sh index 94ab4b5..d901d81 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,16 @@ # Sastha Kumar N [https://github.com/Sastha-Kumar-N] # Sabarinath Subramaniam [https://www.linkedin.com/in/sabarinath-subramaniam-a228014] +# Create a log file and add time of execution to it +printf -- "\n-----------------------------------------\ +\nONECLICK WEBSITE DEPLOYER LOG\ +\n$(date)\ +\n-----------------------------------------\ +\n" >> ~/oneclick-website-deployer.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 + # Define web root folder export DRUPAL_HOME=/var/www/html