From db1cc005a34a6d5314e27b221a7e0b82d9f6c42d Mon Sep 17 00:00:00 2001 From: Chad Date: Tue, 30 Jan 2024 05:59:40 -0700 Subject: [PATCH] Minor Enhancements (#16) * Add datestamp for the files being created. * Enhance output. --- pages/photos.sh | 3 ++- run.sh | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pages/photos.sh b/pages/photos.sh index 51b14cc..88e63bb 100755 --- a/pages/photos.sh +++ b/pages/photos.sh @@ -152,11 +152,12 @@ ls $PHOTOS_DIR/ | sort -r | while read album; do # Close out the ALBUM's page. $HELPER_DIR/body_close.php >> $subpage + echo "" >> $subpage done # Finish the web page. $HELPER_DIR/body_close.php >> $mainpage +echo "" >> $mainpage cat $mainpage -echo "" exit 0 diff --git a/run.sh b/run.sh index e94eb7c..11ea491 100755 --- a/run.sh +++ b/run.sh @@ -41,13 +41,13 @@ done # Ensure we are executing from this file's directory. cd $DIR -# Check if any dependencies need installed. +echo "`date` - Check if any dependencies need installed." if [[ ! `which php` || ! `which node`|| ! `which npm` ]]; then sudo apt install -y php-fpm nodejs npm fi -# Fix any file permissions # Directories and allowed page types are executable, others are not. +echo "`date` - Fix any strange file permissions." find ./pages/ | while read file; do if [[ $file == *".php" || $file == *".sh" || -d $file ]]; then mode=755 @@ -57,12 +57,16 @@ find ./pages/ | while read file; do chmod -c $mode $file done +echo "`date` - Check if any modules need updated/installed." npm install ## Main ## +echo "`date` - Start website API." ./main.js $ports +status=$? ## Finish ## -exit $? +echo "`date` - Exiting with status '$status'." +exit $status