25 lines
500 B
Plaintext
25 lines
500 B
Plaintext
#!/usr/bin/with-contenv bash
|
||
|
||
# cleanup any existing install
|
||
[[ -d /opt/sonarr ]] && \
|
||
rm -rf /opt/sonarr
|
||
mkdir -p /opt/sonarr
|
||
|
||
# (re)install preview version of sonarr
|
||
curl -o \
|
||
/tmp/sonarr.tar.gz -L \
|
||
"http://services.sonarr.tv/v1/download/phantom/latest?os=linux"
|
||
tar xf \
|
||
/tmp/sonarr.tar.gz -C \
|
||
/opt/sonarr --strip-components=1
|
||
rm \
|
||
/tmp/*.tar.gz
|
||
|
||
# cleanup pid if it exists
|
||
[[ -e /config/nzbdrone.pid ]] && \
|
||
rm -rf /config/nzbdrone.pid
|
||
|
||
# permissions
|
||
chown -R abc:abc \
|
||
/opt/sonarr
|