24 lines
No EOL
585 B
Text
24 lines
No EOL
585 B
Text
#!/usr/bin/with-contenv bash
|
|
|
|
# Exit if gui
|
|
if [ "$YTDL_SUB_TYPE" == "gui" ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
# always create the config dir with empty cron logs
|
|
mkdir -p /config
|
|
echo "" > /config/cron_logs.txt
|
|
|
|
echo "[ytdl-sub-init] Checking defaults..."
|
|
|
|
# copy config
|
|
[[ ! -e /config/config.yaml ]] && \
|
|
cp /defaults/config.yaml /config/config.yaml
|
|
[[ ! -e /config/subscriptions.yaml ]] && \
|
|
cp /defaults/subscriptions.yaml /config/subscriptions.yaml
|
|
[[ ! -d /config/examples ]] && \
|
|
cp -R /defaults/examples /config/
|
|
|
|
# permissions
|
|
chown -R ${PUID:-abc}:${PGID:-abc} \
|
|
/config |