log format by apphub entrypoint srript

This commit is contained in:
qiaofeng1227 2024-10-15 11:51:02 +08:00
parent 8f642e393b
commit 7c2704ba2e
4 changed files with 9 additions and 9 deletions

View file

@ -1,6 +1,6 @@
# This file can running at actions # This file can running at actions
# MEDIA_VERSION and LIBRARY_VERSION will trigger its release # MEDIA_VERSION and LIBRARY_VERSION will trigger its release
# modify time: 202410151112, you can modify here to trigger Docker Build action # modify time: 202410151150, you can modify here to trigger Docker Build action
FROM python:3.10-slim-bullseye FROM python:3.10-slim-bullseye

View file

@ -26,7 +26,7 @@ for ((i=0; i<$try_times; i++)); do
done done
if [[ -n "$username" ]]; then if [[ -n "$username" ]]; then
echo "git config --global user.name $username" echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - git config --global user.name $username"
git config --global user.name "$username" git config --global user.name "$username"
else else
echo "username is null, git config username failed" echo "username is null, git config username failed"
@ -35,7 +35,7 @@ fi
regex="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" regex="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
if [[ $email =~ $regex ]]; then if [[ $email =~ $regex ]]; then
echo "git config --global user.email $email" echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - git config --global user.email $email"
git config --global user.email "$email" git config --global user.email "$email"
else else
echo "Not have correct email, git config email failed" echo "Not have correct email, git config email failed"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
echo "start to migrate config.ini" echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - start to migrate config.ini"
migrate_ini() { migrate_ini() {
@ -46,7 +46,7 @@ migrate_ini "/websoft9/apphub/src/config/config.ini" "/websoft9/config/config.in
migrate_ini "/websoft9/apphub/src/config/system.ini" "/websoft9/config/system.ini" migrate_ini "/websoft9/apphub/src/config/system.ini" "/websoft9/config/system.ini"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Success to update config.ini" echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Success to update config.ini"
else else
echo "Fail to update config.ini, skip it" echo "$(date '+%Y-%m-%d %H:%M:%S') - ERROR - Fail to update config.ini, skip it"
fi fi

View file

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
echo "$(date) - Compare remote version and local version." | tee -a /var/log/supervisord.log echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Compare remote version and local version." | tee -a /var/log/supervisord.log
echo "$(date) - Download remote packages and replace local data." | tee -a /var/log/supervisord.log echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Download remote packages and replace local data." | tee -a /var/log/supervisord.log
bash /websoft9/script/update_zip.sh --package_name "media-latest.zip" --sync_to "/websoft9/media" bash /websoft9/script/update_zip.sh --package_name "media-latest.zip" --sync_to "/websoft9/media"
bash /websoft9/script/update_zip.sh --package_name "library-latest.zip" --sync_to "/websoft9/library" bash /websoft9/script/update_zip.sh --package_name "library-latest.zip" --sync_to "/websoft9/library"
echo "$(date) - Success to update library and media." echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Success to update library and media."