🗃️ Committing everything that changed 🗃️

rootfs/usr/local/etc/docker/init.d/zz-nextcloud.sh
This commit is contained in:
casjay 2024-07-07 16:01:12 -04:00
parent 4f1e93c441
commit 5b947e2630
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145

View File

@ -28,9 +28,9 @@
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail [ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
printf '%s\n' "# - - - Initializing next-cloud - - - #" printf '%s\n' "# - - - Initializing nextcloud - - - #"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SERVICE_NAME="next-cloud" SERVICE_NAME="nextcloud"
SCRIPT_NAME="$(basename "$0" 2>/dev/null)" SCRIPT_NAME="$(basename "$0" 2>/dev/null)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
@ -79,15 +79,15 @@ DATABASE_DIR="${DATABASE_DIR_NEXT_CLOUD:-/data/db/sqlite}"
WWW_ROOT_DIR="/usr/share/httpd/default" WWW_ROOT_DIR="/usr/share/httpd/default"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Default predefined variables # Default predefined variables
DATA_DIR="/data/next-cloud" # set data directory DATA_DIR="/data/nextcloud" # set data directory
CONF_DIR="/config/next-cloud" # set config directory CONF_DIR="/config/nextcloud" # set config directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# set the containers etc directory # set the containers etc directory
ETC_DIR="/etc/next-cloud" ETC_DIR="/etc/nextcloud"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TMP_DIR="/tmp/next-cloud" TMP_DIR="/tmp/nextcloud"
RUN_DIR="/run/next-cloud" # set scripts pid dir RUN_DIR="/run/nextcloud" # set scripts pid dir
LOG_DIR="/data/logs/next-cloud" # set log directory LOG_DIR="/data/logs/nextcloud" # set log directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the working dir # Set the working dir
WORK_DIR="" # set working directory WORK_DIR="" # set working directory
@ -111,15 +111,15 @@ SERVICE_PORT="80"
RUNAS_USER="root" # normally root RUNAS_USER="root" # normally root
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# User and group in which the service switches to - IE: nginx,apache,mysql,postgres # User and group in which the service switches to - IE: nginx,apache,mysql,postgres
SERVICE_USER="next-cloud" # execute command as another user SERVICE_USER="nextcloud" # execute command as another user
SERVICE_GROUP="next-cloud" # Set the service group SERVICE_GROUP="nextcloud" # Set the service group
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set user and group ID # Set user and group ID
SERVICE_UID="0" # set the user id SERVICE_UID="0" # set the user id
SERVICE_GID="0" # set the group id SERVICE_GID="0" # set the group id
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# execute command variables - keep single quotes variables will be expanded later # execute command variables - keep single quotes variables will be expanded later
EXEC_CMD_BIN='next-cloud' # command to execute EXEC_CMD_BIN='nextcloud' # command to execute
EXEC_CMD_ARGS='' # command arguments EXEC_CMD_ARGS='' # command arguments
EXEC_PRE_SCRIPT='sleep 60' # execute script before EXEC_PRE_SCRIPT='sleep 60' # execute script before
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -133,8 +133,8 @@ IS_DATABASE_SERVICE="no"
PATH="${PATH:-}" PATH="${PATH:-}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Load variables from config # Load variables from config
[ -f "$CONF_DIR/env/next-cloud.script.sh" ] && . "$CONF_DIR/env/next-cloud.script.sh" # Generated by my dockermgr script [ -f "$CONF_DIR/env/nextcloud.script.sh" ] && . "$CONF_DIR/env/nextcloud.script.sh" # Generated by my dockermgr script
[ -f "$CONF_DIR/env/next-cloud.sh" ] && . "$CONF_DIR/env/next-cloud.sh" # Overwrite the variabes [ -f "$CONF_DIR/env/nextcloud.sh" ] && . "$CONF_DIR/env/nextcloud.sh" # Overwrite the variabes
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional predefined variables # Additional predefined variables
@ -146,7 +146,7 @@ PATH="${PATH:-}"
ADD_APPLICATION_FILES="" ADD_APPLICATION_FILES=""
ADD_APPLICATION_DIRS="" ADD_APPLICATION_DIRS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPLICATION_FILES="$LOG_DIR/next-cloud.log" APPLICATION_FILES="$LOG_DIR/nextcloud.log"
APPLICATION_DIRS="$RUN_DIR $ETC_DIR $CONF_DIR $LOG_DIR $TMP_DIR" APPLICATION_DIRS="$RUN_DIR $ETC_DIR $CONF_DIR $LOG_DIR $TMP_DIR"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional config dirs - will be Copied to /etc/$name # Additional config dirs - will be Copied to /etc/$name
@ -195,7 +195,7 @@ __update_conf_files() {
# define actions # define actions
# replace variables # replace variables
# __replace "" "" "$CONF_DIR/next-cloud.conf" # __replace "" "" "$CONF_DIR/nextcloud.conf"
# replace variables recursively # replace variables recursively
# __find_replace "" "" "$CONF_DIR" # __find_replace "" "" "$CONF_DIR"