Minor Enhancements (#16)
* Add datestamp for the files being created. * Enhance output.
This commit is contained in:
parent
f0661ca4b2
commit
db1cc005a3
@ -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 "<!-- Built on `date`. -->" >> $subpage
|
||||
done
|
||||
|
||||
# Finish the web page.
|
||||
$HELPER_DIR/body_close.php >> $mainpage
|
||||
echo "<!-- Built on `date`. -->" >> $mainpage
|
||||
|
||||
cat $mainpage
|
||||
echo "<!-- Built from scratch. -->"
|
||||
exit 0
|
||||
|
10
run.sh
10
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user