Minor Enhancements (#16)

* Add datestamp for the files being created.

* Enhance output.
This commit is contained in:
2024-01-30 05:59:40 -07:00
committed by GitHub
parent f0661ca4b2
commit db1cc005a3
2 changed files with 9 additions and 4 deletions

10
run.sh
View File

@ -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