#!/bin/sh

image_name=`uci get jellyfin.@jellyfin[0].image 2>/dev/null`

if [ "$image_name" == "jjm2473/jellyfin-rtk:latest" -o "$image_name" == "default" ]; then
    uci -q batch <<-EOF >/dev/null
        delete jellyfin.@jellyfin[0].image
        commit jellyfin
EOF
fi
exit 0
