v1.0.4 - Only install packages if script hasn't previously been run..
If a log file exists for the script, skip the package installation procedure.
This commit is contained in:
parent
05b43f9201
commit
2c750147ad
1 changed files with 8 additions and 4 deletions
|
@ -1,13 +1,17 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
scriptVersion="1.0.3"
|
scriptVersion="1.0.4"
|
||||||
|
|
||||||
######## Settings
|
######## Settings
|
||||||
scriptInterval="15m"
|
scriptInterval="15m"
|
||||||
|
|
||||||
######## Package dependencies installation
|
######## Package dependencies installation
|
||||||
PackageInstallation () {
|
PackageInstallation () {
|
||||||
apk add -U --update --no-cache curl jq python3-dev py3-pip &>/dev/null
|
if [ ! -f "/config/logs/QueueCleaner.txt" ]; then
|
||||||
pip install --upgrade --no-cache-dir -U yq &>/dev/null
|
echo "Installing Required Packages..."
|
||||||
|
apk add -U --update --no-cache curl jq python3-dev py3-pip &>/dev/null
|
||||||
|
pip install --upgrade --no-cache-dir -U yq &>/dev/null
|
||||||
|
echo "Done"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Logging output function
|
# Logging output function
|
||||||
|
@ -121,7 +125,7 @@ arrName="$(cat /config/config.xml | xq | jq -r .Config.InstanceName)"
|
||||||
if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ] || [ "$arrName" == "Lidarr" ] || [ "$arrName" == "Readarr" ]; then
|
if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ] || [ "$arrName" == "Lidarr" ] || [ "$arrName" == "Readarr" ]; then
|
||||||
for (( ; ; )); do
|
for (( ; ; )); do
|
||||||
let i++
|
let i++
|
||||||
log "Starting..."
|
log "Starting..."
|
||||||
QueueCleanerProcess
|
QueueCleanerProcess
|
||||||
log "Sleeping $scriptInterval..."
|
log "Sleeping $scriptInterval..."
|
||||||
sleep $scriptInterval
|
sleep $scriptInterval
|
||||||
|
|
Loading…
Reference in a new issue