Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MyMusicBoxApi/release
Original file line number Diff line number Diff line change
Expand Up @@ -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=(
Expand Down
7 changes: 4 additions & 3 deletions MyMusicBoxApi/service/ytdlpHotfix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package service
import (
"fmt"
"log"
"musicboxapi/logging"
"os"
)

Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions MyMusicBoxApi/update
Original file line number Diff line number Diff line change
Expand Up @@ -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 ==="

Expand Down Expand Up @@ -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."
Expand Down