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.
|
# Close out the ALBUM's page.
|
||||||
$HELPER_DIR/body_close.php >> $subpage
|
$HELPER_DIR/body_close.php >> $subpage
|
||||||
|
echo "<!-- Built on `date`. -->" >> $subpage
|
||||||
done
|
done
|
||||||
|
|
||||||
# Finish the web page.
|
# Finish the web page.
|
||||||
$HELPER_DIR/body_close.php >> $mainpage
|
$HELPER_DIR/body_close.php >> $mainpage
|
||||||
|
echo "<!-- Built on `date`. -->" >> $mainpage
|
||||||
|
|
||||||
cat $mainpage
|
cat $mainpage
|
||||||
echo "<!-- Built from scratch. -->"
|
|
||||||
exit 0
|
exit 0
|
||||||
|
10
run.sh
10
run.sh
@ -41,13 +41,13 @@ done
|
|||||||
# Ensure we are executing from this file's directory.
|
# Ensure we are executing from this file's directory.
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
# Check if any dependencies need installed.
|
echo "`date` - Check if any dependencies need installed."
|
||||||
if [[ ! `which php` || ! `which node`|| ! `which npm` ]]; then
|
if [[ ! `which php` || ! `which node`|| ! `which npm` ]]; then
|
||||||
sudo apt install -y php-fpm nodejs npm
|
sudo apt install -y php-fpm nodejs npm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix any file permissions
|
|
||||||
# Directories and allowed page types are executable, others are not.
|
# Directories and allowed page types are executable, others are not.
|
||||||
|
echo "`date` - Fix any strange file permissions."
|
||||||
find ./pages/ | while read file; do
|
find ./pages/ | while read file; do
|
||||||
if [[ $file == *".php" || $file == *".sh" || -d $file ]]; then
|
if [[ $file == *".php" || $file == *".sh" || -d $file ]]; then
|
||||||
mode=755
|
mode=755
|
||||||
@ -57,12 +57,16 @@ find ./pages/ | while read file; do
|
|||||||
chmod -c $mode $file
|
chmod -c $mode $file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "`date` - Check if any modules need updated/installed."
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
## Main ##
|
## Main ##
|
||||||
|
|
||||||
|
echo "`date` - Start website API."
|
||||||
./main.js $ports
|
./main.js $ports
|
||||||
|
status=$?
|
||||||
|
|
||||||
## Finish ##
|
## Finish ##
|
||||||
|
|
||||||
exit $?
|
echo "`date` - Exiting with status '$status'."
|
||||||
|
exit $status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user