mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -04:00
Merge pull request #597 from linuxserver/mod-scripts-pretty
This commit is contained in:
+36
-8
@@ -22,19 +22,47 @@ set_legacy_executable_bits() {
|
|||||||
tamper_check() {
|
tamper_check() {
|
||||||
# Tamper check custom service locations
|
# Tamper check custom service locations
|
||||||
if [[ -d "${SERVICES_DIR}" ]] && [[ -n "$(find ${SERVICES_DIR}/* ! -user root 2>/dev/null)" ]]; then
|
if [[ -d "${SERVICES_DIR}" ]] && [[ -n "$(find ${SERVICES_DIR}/* ! -user root 2>/dev/null)" ]]; then
|
||||||
echo "[custom-init] **** Some of the contents of the folder '${SERVICES_DIR}' are not owned by root, which is a security risk. ****"
|
echo "╔═════════════════════════════════════════════════════════════════════════╗
|
||||||
echo "[custom-init] **** Please review the permissions of this folder and its contents to make sure they are owned by root, and can only be modified by root. ****"
|
║ ║
|
||||||
|
║ Some of the contents of the folder ${SERVICES_DIR} ║
|
||||||
|
║ are not owned by root, which is a security risk. ║
|
||||||
|
║ ║
|
||||||
|
║ Please review the permissions of this folder and its contents to make ║
|
||||||
|
║ sure they are owned by root, and can only be modified by root. ║
|
||||||
|
║ ║
|
||||||
|
╚═════════════════════════════════════════════════════════════════════════╝"
|
||||||
elif [[ -d "${SERVICES_DIR}" ]] && [[ -n "$(find ${SERVICES_DIR}/* -perm -o+w 2>/dev/null)" ]]; then
|
elif [[ -d "${SERVICES_DIR}" ]] && [[ -n "$(find ${SERVICES_DIR}/* -perm -o+w 2>/dev/null)" ]]; then
|
||||||
echo "[custom-init] **** Some of the contents of the folder '${SERVICES_DIR}' have write permissions for others, which is a security risk. ****"
|
echo "╔═════════════════════════════════════════════════════════════════════════╗
|
||||||
echo "[custom-init] **** Please review the permissions of this folder and its contents to make sure they are owned by root, and can only be modified by root. ****"
|
║ ║
|
||||||
|
║ Some of the contents of the folder ${SERVICES_DIR} ║
|
||||||
|
║ have write permissions for others, which is a security risk. ║
|
||||||
|
║ ║
|
||||||
|
║ Please review the permissions of this folder and its contents to make ║
|
||||||
|
║ sure they are owned by root, and can only be modified by root. ║
|
||||||
|
║ ║
|
||||||
|
╚═════════════════════════════════════════════════════════════════════════╝"
|
||||||
fi
|
fi
|
||||||
# Tamper check custom script locations
|
# Tamper check custom script locations
|
||||||
if [[ -d "${SCRIPTS_DIR}" ]] && [[ -n "$(find ${SCRIPTS_DIR}/* ! -user root 2>/dev/null)" ]]; then
|
if [[ -d "${SCRIPTS_DIR}" ]] && [[ -n "$(find ${SCRIPTS_DIR}/* ! -user root 2>/dev/null)" ]]; then
|
||||||
echo "[custom-init] **** Some of the contents of the folder '${SCRIPTS_DIR}' are not owned by root, which is a security risk. ****"
|
echo "╔═════════════════════════════════════════════════════════════════════════╗
|
||||||
echo "[custom-init] **** Please review the permissions of this folder and its contents to make sure they are owned by root, and can only be modified by root. ****"
|
║ ║
|
||||||
|
║ Some of the contents of the folder ${SCRIPTS_DIR} ║
|
||||||
|
║ are not owned by root, which is a security risk. ║
|
||||||
|
║ ║
|
||||||
|
║ Please review the permissions of this folder and its contents to make ║
|
||||||
|
║ sure they are owned by root, and can only be modified by root. ║
|
||||||
|
║ ║
|
||||||
|
╚═════════════════════════════════════════════════════════════════════════╝"
|
||||||
elif [[ -d "${SCRIPTS_DIR}" ]] && [[ -n "$(find ${SCRIPTS_DIR}/* -perm -o+w 2>/dev/null)" ]]; then
|
elif [[ -d "${SCRIPTS_DIR}" ]] && [[ -n "$(find ${SCRIPTS_DIR}/* -perm -o+w 2>/dev/null)" ]]; then
|
||||||
echo "[custom-init] **** Some of the contents of the folder '${SCRIPTS_DIR}' have write permissions for others, which is a security risk. ****"
|
echo "╔═════════════════════════════════════════════════════════════════════════╗
|
||||||
echo "[custom-init] **** Please review the permissions of this folder and its contents to make sure they are owned by root, and can only be modified by root. ****"
|
║ ║
|
||||||
|
║ Some of the contents of the folder ${SCRIPTS_DIR} ║
|
||||||
|
║ have write permissions for others, which is a security risk. ║
|
||||||
|
║ ║
|
||||||
|
║ Please review the permissions of this folder and its contents to make ║
|
||||||
|
║ sure they are owned by root, and can only be modified by root. ║
|
||||||
|
║ ║
|
||||||
|
╚═════════════════════════════════════════════════════════════════════════╝"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user