Add Drone CI pipeline configuration and Docker setup for Jellyfin
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
SELECTOR=${JELLYFIN:-jellyfin}
|
||||
JELLYFIN_IP=$(hostname -i | awk '{print $1}')
|
||||
HOST_FILE=/etc/system/data/dns/hosts.local
|
||||
|
||||
EXISTS=$(grep -w -F $SELECTOR $HOST_FILE)
|
||||
if [ -n "$EXISTS" ]; then
|
||||
# selector already exists in hosts file and SCALE is not in use
|
||||
IP=$(echo $EXISTS | cut -d ' ' -f1)
|
||||
sed "s/$IP/$JELLYFIN_IP/g" $HOST_FILE >/tmp/hosts.local
|
||||
mv /tmp/hosts.local $HOST_FILE
|
||||
else
|
||||
echo "$JELLYFIN_IP $SELECTOR" >>$HOST_FILE
|
||||
fi
|
||||
|
||||
# create neccesary directories
|
||||
mkdir -p /etc/user/data/jellyfin/config
|
||||
mkdir -p /etc/system/data/jellyfin/cache
|
||||
mkdir -p /etc/user/data/jellyfin/media
|
||||
Reference in New Issue
Block a user