diff --git a/MyMusicBoxApi/release b/MyMusicBoxApi/release index eb4022b..409ac42 100755 --- a/MyMusicBoxApi/release +++ b/MyMusicBoxApi/release @@ -9,7 +9,7 @@ SCRIPTS_FOLDER="$DATABASE_FOLDER/initscripts" IMAGES_FOLDER="$RELEASE_FOLDER/music/images" COOKIES_FOLDER="$RELEASE_FOLDER/selenium" MIGRATION_FOLDER="$RELEASE_FOLDER/migration_scripts" -HOTFIX_FOLDER="$RELEASE_FOLDER/hotfix_logs" +HOTFIX_FOLDER="$RELEASE_FOLDER/music/hotfix_logs" echo "=== Setting up release folder ===" FOLDERS=( diff --git a/MyMusicBoxApi/service/ytdlpHotfix.go b/MyMusicBoxApi/service/ytdlpHotfix.go index 6411597..b289145 100644 --- a/MyMusicBoxApi/service/ytdlpHotfix.go +++ b/MyMusicBoxApi/service/ytdlpHotfix.go @@ -3,6 +3,7 @@ package service import ( "fmt" "log" + "musicboxapi/logging" "os" ) @@ -19,14 +20,14 @@ func FlatPlaylistDownload( logOutput string, logOutputError string, ) bool { - - Stdout, err := os.OpenFile(logOutput, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + Stdout, err := os.Create(logOutput) if err != nil { + logging.ErrorStackTrace(err) panic(-65465465) } - Stderr, err := os.OpenFile(logOutputError, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + Stderr, err := os.Create(logOutputError) if err != nil { panic(-65324465) diff --git a/MyMusicBoxApi/update b/MyMusicBoxApi/update index fac05b4..bcb93c4 100755 --- a/MyMusicBoxApi/update +++ b/MyMusicBoxApi/update @@ -7,7 +7,7 @@ SCRIPTS_FOLDER="$DATABASE_FOLDER/initscripts" IMAGES_FOLDER="$RELEASE_FOLDER/music/images" COOKIES_FOLDER="$RELEASE_FOLDER/selenium" MIGRATION_FOLDER="$RELEASE_FOLDER/migration_scripts" -HOTFIX_FOLDER="$RELEASE_FOLDER/hotfix_logs" +HOTFIX_FOLDER="$RELEASE_FOLDER/music/hotfix_logs" echo "=== Checking release folder ===" @@ -38,9 +38,9 @@ cp selenium/* "$COOKIES_FOLDER" echo "=== Updating executable ===" go build -trimpath -buildvcs=false -ldflags="-s -w" -o "$RELEASE_FOLDER" -echo "=== Reducing executable size ===" -cd "$RELEASE_FOLDER" -upx --best --lzma musicboxapi +# echo "=== Reducing executable size ===" +# cd "$RELEASE_FOLDER" +# upx --best --lzma musicboxapi echo "=== Restarting mymusic service ===" sudo systemctl stop mymusic || echo "Service 'mymusic' was not running."