mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-11-23 07:21:10 +01:00
Add new init service "init-wpconfig-verify"
This commit is contained in:
parent
f2951e8d8b
commit
5c8959d938
58
rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run
Executable file
58
rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run
Executable file
|
@ -0,0 +1,58 @@
|
|||
#!/command/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
checkSaltsEnv() {
|
||||
if [ -z "${WORDPRESS_AUTH_KEY}" ]; then
|
||||
echo "- WORDPRESS_AUTH_KEY is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_SECURE_AUTH_KEY}" ]; then
|
||||
echo "- WORDPRESS_SECURE_AUTH_KEY is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_LOGGED_IN_KEY}" ]; then
|
||||
echo "- WORDPRESS_LOGGED_IN_KEY is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_NONCE_KEY}" ]; then
|
||||
echo "- WORDPRESS_NONCE_KEY is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_AUTH_SALT}" ]; then
|
||||
echo "- WORDPRESS_AUTH_SALT is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_SECURE_AUTH_SALT}" ]; then
|
||||
echo "- WORDPRESS_SECURE_AUTH_SALT is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_LOGGED_IN_SALT}" ]; then
|
||||
echo "- WORDPRESS_LOGGED_IN_SALT is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_NONCE_SALT}" ]; then
|
||||
echo "- WORDPRESS_NONCE_SALT is not set"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# init-wpconfig-verify main
|
||||
main() {
|
||||
# This will prepend service name to all output from here
|
||||
exec > >(while read -r line; do echo "[init-wpconfig-verify] ${line}"; done) 2>&1
|
||||
|
||||
echo "Checking salts..."
|
||||
if ! checkSaltsEnv; then
|
||||
echo "^^^ Some or all of the salts are not set. Cannot continue."
|
||||
return 1
|
||||
fi
|
||||
|
||||
}
|
||||
main
|
1
rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
1
rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/up
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/up
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run
|
Loading…
Reference in New Issue
Block a user