Skip to content
Open
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
6 changes: 6 additions & 0 deletions Huntarr.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -36,6 +37,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down Expand Up @@ -79,10 +81,12 @@ HuntarrAPILimitFile () {
# Create base directory for various functions/process
if [ ! -d "/config/huntarr" ]; then
mkdir -p "/config/huntarr"
chown ${PUID:-1000}:${PGID:-1000} "/config/huntarr"
fi
apiLimitFile="Huntarr-api-search-count-$(date +"%Y_%m_%d").txt"
if [ ! -f "/config/huntarr/$apiLimitFile" ]; then
echo -n "0" > "/config/huntarr/$apiLimitFile"
chown ${PUID:-1000}:${PGID:-1000} "/config/huntarr/$apiLimitFile"
fi

if find "/config/huntarr" -type f -iname "Huntarr-api-search-count-*.txt" | read; then
Expand Down Expand Up @@ -199,11 +203,13 @@ HuntarrProcess () {
# create log folder for searched items
if [ ! -d "/config/huntarr/$settingsFileName/$arrApp" ]; then
mkdir -p "/config/huntarr/$settingsFileName/$arrApp"
chown ${PUID:-1000}:${PGID:-1000} "/config/huntarr/$settingsFileName/$arrApp"
fi

# create log of searched item
if [ ! -f "/config/huntarr/$settingsFileName/$arrApp/$arrItemId" ]; then
touch "/config/huntarr/$settingsFileName/$arrApp/$arrItemId"
chown ${PUID:-1000}:${PGID:-1000} "/config/huntarr/$settingsFileName/$arrApp/$arrItemId"
fi
done
}
Expand Down
7 changes: 7 additions & 0 deletions Lidarr-MusicAutomator.bash
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ArlSetup () {
if [ ! -d "$deemixFolder" ]; then
log "Creating Deemix Config folder"
mkdir -p "$deemixFolder"
chown ${PUID:-1000}:${PGID:-1000} "$deemixFolder"
fi
if [ -f "$deemixFolder/.arl" ]; then
log "Deleting ARL"
Expand Down Expand Up @@ -87,6 +88,7 @@ logfileSetup () {

if [ ! -f "$dockerPath/$logFileName" ]; then
echo "" > "$dockerPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerPath/$logFileName"
chmod 666 "$dockerPath/$logFileName"
fi
}
Expand Down Expand Up @@ -191,6 +193,7 @@ SearchDeezerAlbums () {
# delete temporary download location if needed
if [ ! -d "$incompleteDownloadPath" ]; then
mkdir -p "$incompleteDownloadPath"
chown ${PUID:-1000}:${PGID:-1000} "$incompleteDownloadPath"
fi

# download tracks
Expand All @@ -199,12 +202,14 @@ SearchDeezerAlbums () {
# Create import location
if [ ! -d "$completeDownloadPath" ]; then
mkdir -p "$completeDownloadPath"
chown ${PUID:-1000}:${PGID:-1000} "$completeDownloadPath"
chmod 777 -R "$completeDownloadPath"
fi

# Create import location album folder
if [ ! -d "$completeDownloadPath/$downloadAlbumFolderName" ]; then
mkdir -p "$completeDownloadPath/$downloadAlbumFolderName"
chown ${PUID:-1000}:${PGID:-1000} "$completeDownloadPath/$downloadAlbumFolderName"
fi

# Move downloaded files to import location album folder
Expand All @@ -222,6 +227,7 @@ SearchDeezerAlbums () {

if [ ! -d "$completedSearchIdLocation" ]; then
mkdir -p "$completedSearchIdLocation"
chown ${PUID:-1000}:${PGID:-1000} "$completedSearchIdLocation"
chmod 777 -R "$completedSearchIdLocation"
fi

Expand Down Expand Up @@ -321,6 +327,7 @@ LidarrWantedSearch () {

if [ ! -d "$completedSearchIdLocation" ]; then
mkdir -p "$completedSearchIdLocation"
chown ${PUID:-1000}:${PGID:-1000} "$completedSearchIdLocation"
chmod 777 -R "$completedSearchIdLocation"
fi

Expand Down
4 changes: 4 additions & 0 deletions Lidarr-MusicVideoAutomator.bash
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ logfileSetup () {

if [ ! -f "$dockerPath/logs/$logFileName" ]; then
echo "" > "$dockerPath/logs/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerPath/logs/$logFileName"
chmod 666 "$dockerPath/logs/$logFileName"
fi
}
Expand Down Expand Up @@ -205,12 +206,14 @@ CompletedFileMover () {
if [ ! -d "$lidarrMusicVideoLibrary" ]; then
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $videoIdProcess/$videoIdsCount :: $videoArtist :: $videoYear :: $videoType :: $videoTitle :: Creating Library Folder"
mkdir -p "$lidarrMusicVideoLibrary"
chown ${PUID:-1000}:${PGID:-1000} "$lidarrMusicVideoLibrary"
chmod 777 "$lidarrMusicVideoLibrary"
fi

if [ ! -d "$lidarrMusicVideoLibrary/$lidarrArtistFolder" ]; then
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $videoIdProcess/$videoIdsCount :: $videoArtist :: $videoYear :: $videoType :: $videoTitle :: Creating Artist Folder: $lidarrArtistFolder"
mkdir -p "$lidarrMusicVideoLibrary/$lidarrArtistFolder"
chown ${PUID:-1000}:${PGID:-1000} "$lidarrMusicVideoLibrary/$lidarrArtistFolder"
chmod 777 "$lidarrMusicVideoLibrary/$lidarrArtistFolder"
fi

Expand Down Expand Up @@ -454,6 +457,7 @@ tidalProcess () {
if [ ! -d "$logFolder" ]; then
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $videoIdProcess/$videoIdsCount :: $videoArtist :: $videoYear :: $videoType :: $videoTitle :: Creating log folder: $logFolder"
mkdir -p "$logFolder"
chown ${PUID:-1000}:${PGID:-1000} "$logFolder"
chmod 777 "$logFolder"
fi

Expand Down
2 changes: 2 additions & 0 deletions Queue-Cleaner.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -35,6 +36,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down
2 changes: 2 additions & 0 deletions Radarr-Invalid-Movie-Auto-Cleaner.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -27,6 +28,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down
2 changes: 2 additions & 0 deletions Radarr-UnmappedFolderCleaner.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -27,6 +28,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down
2 changes: 2 additions & 0 deletions Sonarr-DailySeriesEpisodeTrimmer.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -28,6 +29,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down
2 changes: 2 additions & 0 deletions Sonarr-Invalid-Series-Auto-Cleaner.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -27,6 +28,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down
2 changes: 2 additions & 0 deletions Sonarr-UnmappedFolderCleaner.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ logfileSetup () {

if [ ! -d "$dockerLogPath" ]; then
mkdir -p "$dockerLogPath"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath"
chmod 777 "$dockerLogPath"
fi

Expand All @@ -27,6 +28,7 @@ logfileSetup () {

if [ ! -f "$dockerLogPath/$logFileName" ]; then
echo "" > "$dockerLogPath/$logFileName"
chown ${PUID:-1000}:${PGID:-1000} "$dockerLogPath/$logFileName"
chmod 666 "$dockerLogPath/$logFileName"
fi
}
Expand Down