#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [[ -n "$(/bin/ls -A "/config/custom-cont-init.d" 2>/dev/null)" ]] ||
    [[ -n "$(/bin/ls -A "/config/custom-services.d" 2>/dev/null)" ]]; then
    cat << EOF | tee /config/custom-cont-init.d/README.txt 2>/dev/null
********************************************************
********************************************************
*                                                      *
*                         !!!!                         *
* Custom scripts or services found in legacy locations *
*                         !!!!                         *
*    Please move your custom scripts and services      *
*    to /custom-cont-init.d and /custom-services.d     *
*    respectively to ensure they continue working.     *
*                                                      *
*  Visit https://linuxserver.io/custom for more info.  *
*                                                      *
********************************************************
********************************************************
EOF
fi
exit 0
