mirror of
https://github.com/casjaysdevdocker/cherokee
synced 2025-09-18 09:57:47 -04:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
284
rootfs/usr/local/bin/entrypoint.sh
Executable file
284
rootfs/usr/local/bin/entrypoint.sh
Executable file
@@ -0,0 +1,284 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202210201649-git
|
||||
# @@Author : Jason Hempstead
|
||||
# @@Contact : jason@casjaysdev.com
|
||||
# @@License : LICENSE.md
|
||||
# @@ReadME : entrypoint.sh --help
|
||||
# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments
|
||||
# @@Created : Thursday, Oct 20, 2022 16:49 EDT
|
||||
# @@File : entrypoint.sh
|
||||
# @@Description : entrypoint point for cherokee
|
||||
# @@Changelog : New script
|
||||
# @@TODO : Better documentation
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Terminal App : no
|
||||
# @@sudo/root : no
|
||||
# @@Template : other/docker-entrypoint
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set bash options
|
||||
[ -n "$DEBUG" ] && set -x
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set functions
|
||||
__exec_command() {
|
||||
local exitCode=0
|
||||
local cmd="${*:-bash -l}"
|
||||
echo "${exec_message:-Executing command: $cmd}"
|
||||
$cmd || exitCode=1
|
||||
[ "$exitCode" = 0 ] || exitCode=10
|
||||
return ${exitCode:-$?}
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -x "$1" || return 1; }
|
||||
__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; }
|
||||
__curl() { curl -q -LSsf -o /dev/null -s -w "200" "$@" 2>/dev/null || return 10; }
|
||||
__pgrep() { __pcheck "${1:-$SERVICE_NAME}" || ps aux 2>/dev/null | grep -Fw " ${1:-$SERVICE_NAME}" | grep -qv ' grep' || return 10; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__certbot() {
|
||||
[ -n "$DOMANNAME" ] && [ -n "$CERT_BOT_MAIL" ] || { echo "The variables DOMANNAME and CERT_BOT_MAIL are set" && exit 1; }
|
||||
[ "$SSL_CERT_BOT" = "true" ] && type -P certbot &>/dev/null || { export SSL_CERT_BOT="" && return 10; }
|
||||
certbot $1 --agree-tos -m $CERT_BOT_MAIL certonly --webroot -w "${WWW_ROOT_DIR:-/data/htdocs/www}" -d $DOMAINNAME -d $DOMAINNAME \
|
||||
--put-all-related-files-into "$SSL_DIR" -key-path "$SSL_KEY" -fullchain-path "$SSL_CERT"
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__heath_check() {
|
||||
status=0 health="Good"
|
||||
__pgrep ${1:-} || status=$((status + 1))
|
||||
#__curl "https://1.1.1.1" || status=$((status + 1))
|
||||
#__curl "http://localhost:$HTTP_PORT/server-health" || status=$((status + 1))
|
||||
[ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME"
|
||||
echo "$(uname -s) $(uname -m) is running and the health is: $health"
|
||||
return ${status:-$?}
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__start_all_services() {
|
||||
echo "$service_message"
|
||||
start-fpm.sh &
|
||||
start-cherokee.sh
|
||||
return $?
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional functions
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# export functions
|
||||
export -f __exec_command __pcheck __pgrep __find __curl __heath_check __certbot __start_all_services
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Define default variables - do not change these - redefine with -e or set under Additional
|
||||
DISPLAY="${DISPLAY:-}"
|
||||
LANG="${LANG:-C.UTF-8}"
|
||||
DOMAINNAME="${DOMAINNAME:-}"
|
||||
TZ="${TZ:-America/New_York}"
|
||||
HTTP_PORT="${HTTP_PORT:-80}"
|
||||
HTTPS_PORT="${HTTPS_PORT:-}"
|
||||
SERVICE_PORT="${SERVICE_PORT:-}"
|
||||
SERVICE_NAME="${CONTAINER_NAME:-}"
|
||||
HOSTNAME="${HOSTNAME:-casjaysdev-cherokee}"
|
||||
HOSTADMIN="${HOSTADMIN:-root@${DOMAINNAME:-$HOSTNAME}}"
|
||||
CERT_BOT_MAIL="${CERT_BOT_MAIL:-certbot-mail@casjay.net}"
|
||||
SSL_CERT_BOT="${SSL_CERT_BOT:-false}"
|
||||
SSL_ENABLED="${SSL_ENABLED:-false}"
|
||||
SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||
SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}"
|
||||
SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}"
|
||||
SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}"
|
||||
SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}"
|
||||
WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}"
|
||||
LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}"
|
||||
DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"
|
||||
DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
||||
DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
||||
CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')"
|
||||
[ -n "$HTTP_PORT" ] || [ -n "$HTTPS_PORT" ] || HTTP_PORT="$SERVICE_PORT"
|
||||
[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional variables and variable overrides
|
||||
#SERVICE_NAME=""
|
||||
export service_message="Starting $CONTAINER_NAME"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Check if this is a new container
|
||||
[ -f "/data/.docker_has_run" ] && DATA_DIR_INITIALIZED="true" || DATA_DIR_INITIALIZED="false"
|
||||
[ -f "/config/.docker_has_run" ] && CONFIG_DIR_INITIALIZED="true" || CONFIG_DIR_INITIALIZED="false"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# export variables
|
||||
export LANG TZ DOMAINNAME HOSTNAME HOSTADMIN SSL_ENABLED SSL_DIR SSL_CA SSL_KEY SERVICE_NAME
|
||||
export SSL_DIR HTTP_PORT HTTPS_PORT LOCAL_BIN_DIR DEFAULT_CONF_DIR CONTAINER_IP_ADDRESS
|
||||
export SSL_CONTAINER_DIR SSL_CERT_BOT DISPLAY CONFIG_DIR_INITIALIZED DATA_DIR_INITIALIZED
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# import variables from file
|
||||
[ -f "/root/env.sh" ] && . "/root/env.sh"
|
||||
[ -f "/config/env.sh" ] && "/config/env.sh"
|
||||
[ -f "/config/.env.sh" ] && . "/config/.env.sh"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set timezone
|
||||
[ -n "$TZ" ] && echo "$TZ" >"/etc/timezone"
|
||||
[ -f "/usr/share/zoneinfo/$TZ" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set hostname
|
||||
if [ -n "$HOSTNAME" ]; then
|
||||
echo "$HOSTNAME" >"/etc/hostname"
|
||||
echo "127.0.0.1 $HOSTNAME localhost $HOSTNAME.local" >"/etc/hosts"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Add domain to hosts file
|
||||
if [ -n "$DOMAINNAME" ]; then
|
||||
echo "$HOSTNAME.${DOMAINNAME:-local}" >"/etc/hostname"
|
||||
echo "127.0.0.1 $HOSTNAME localhost $HOSTNAME.local" >"/etc/hosts"
|
||||
echo "${CONTAINER_IP_ADDRESS:-127.0.0.1} $HOSTNAME.$DOMAINNAME" >>"/etc/hosts"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Delete any gitkeep files
|
||||
[ -d "/data" ] && rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep
|
||||
[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/data"/*/*.gitkeep
|
||||
[ -f "/usr/local/bin/.gitkeep" ] && rm -Rf "/usr/local/bin/.gitkeep"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create directories
|
||||
[ -d "/etc/ssl" ] || mkdir -p "$SSL_CONTAINER_DIR"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create files
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create symlinks
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
if [ "$SSL_ENABLED" = "true" ] || [ "$SSL_ENABLED" = "yes" ]; then
|
||||
if [ -f "/config/ssl/server.crt" ] && [ -f "/config/ssl/server.key" ]; then
|
||||
export SSL_ENABLED="true"
|
||||
if [ -n "$SSL_CA" ] && [ -f "$SSL_CA" ]; then
|
||||
mkdir -p "$SSL_CONTAINER_DIR/certs"
|
||||
cat "$SSL_CA" >>"/etc/ssl/certs/ca-certificates.crt"
|
||||
cp -Rf "/config/ssl/." "$SSL_CONTAINER_DIR/"
|
||||
fi
|
||||
else
|
||||
[ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR"
|
||||
create-ssl-cert
|
||||
fi
|
||||
type update-ca-certificates &>/dev/null && update-ca-certificates
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ -f "$SSL_CA" ] && cp -Rfv "$SSL_CA" "$SSL_CONTAINER_DIR/ca.crt"
|
||||
[ -f "$SSL_KEY" ] && cp -Rfv "$SSL_KEY" "$SSL_CONTAINER_DIR/server.key"
|
||||
[ -f "$SSL_CERT" ] && cp -Rfv "$SSL_CERT" "$SSL_CONTAINER_DIR/server.crt"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Setup bin directory
|
||||
SET_USR_BIN=""
|
||||
[ -d "/data/bin" ] && SET_USR_BIN+="$(__find /data/bin f) "
|
||||
[ -d "/config/bin" ] && SET_USR_BIN+="$(__find /config/bin f) "
|
||||
if [ -n "$SET_USR_BIN" ]; then
|
||||
echo "Setting up bin"
|
||||
for create_bin in $SET_USR_BIN; do
|
||||
create_bin_name="$(basename "$create_bin")"
|
||||
ln -sf "$create_bin" "$LOCAL_BIN_DIR/$create_bin_name"
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create default config
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then
|
||||
echo "Copying default config files"
|
||||
if [ -n "$DEFAULT_TEMPLATE_DIR" ] && [ -d "$DEFAULT_TEMPLATE_DIR" ]; then
|
||||
for create_template in "$DEFAULT_TEMPLATE_DIR"/*; do
|
||||
create_template_name="$(basename "$create_template")"
|
||||
cp -Rf "$create_template" "/config/$create_template_name" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom config files
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then
|
||||
echo "Copying custom config files"
|
||||
for create_config in "$DEFAULT_CONF_DIR"/*; do
|
||||
create_config_name="$(basename "$create_config")"
|
||||
cp -Rf "$create_config" "/config/$create_config_name" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom data files
|
||||
if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "/data" ]; then
|
||||
echo "Copying data files"
|
||||
for create_data in "$DEFAULT_DATA_DIR"/*; do
|
||||
create_data_name="$(basename "$create_data")"
|
||||
cp -Rf "$create_data" "/data/$create_data_name" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy /config to /etc
|
||||
if [ -d "/config" ]; then
|
||||
echo "Copying /config to /etc"
|
||||
for create_conf in /config/*; do
|
||||
if [ -n "$create_conf" ]; then
|
||||
create_conf_name="$(basename "$create_conf")"
|
||||
if [ -e "/etc/$create_conf_name" ]; then
|
||||
if [ -d "/etc/$create_conf_name" ]; then
|
||||
cp -Rf "$create_conf/." "/etc/$create_conf_name/" 2>/dev/null
|
||||
else
|
||||
cp -Rf "$create_conf" "/etc/$create_conf_name" 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Unset unneeded variables
|
||||
unset SET_USR_BIN create_bin create_bin_name create_template create_template_name
|
||||
unset create_data create_data_name create_config create_config_name create_conf create_conf_name
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ -f "/data/.docker_has_run" ] || { [ -d "/data" ] && echo "Initialized on: $(date)" >"/data/.docker_has_run"; }
|
||||
[ -f "/config/.docker_has_run" ] || { [ -d "/config" ] && echo "Initialized on: $(date)" >"/config/.docker_has_run"; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional commands
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Show message
|
||||
echo "Container ip address is: $CONTAINER_IP_ADDRESS"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
case "$1" in
|
||||
--help) # Help message
|
||||
echo 'Docker container for '$APPNAME''
|
||||
echo "Usage: $APPNAME [healthcheck, bash, command]"
|
||||
echo "Failed command will have exit code 10"
|
||||
echo ""
|
||||
exit ${exitCode:-$?}
|
||||
;;
|
||||
|
||||
healthcheck) # Docker healthcheck
|
||||
__heath_check "${1:-$SERVICE_NAME}" || exitCode=10
|
||||
exit ${exitCode:-$?}
|
||||
;;
|
||||
|
||||
*/bin/sh | */bin/bash | bash | shell | sh) # Launch shell
|
||||
shift 1
|
||||
__exec_command "${@:-/bin/bash}"
|
||||
exit ${exitCode:-$?}
|
||||
;;
|
||||
|
||||
certbot)
|
||||
shift 1
|
||||
SSL_CERT_BOT="true"
|
||||
if [ "$1" = "create" ]; then
|
||||
shift 1
|
||||
__certbot
|
||||
elif [ "$1" = "renew" ]; then
|
||||
shift 1
|
||||
__certbot "renew certonly --force-renew"
|
||||
else
|
||||
__exec_command "certbot" "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
*) # Execute primary command
|
||||
if [ $# -eq 0 ]; then
|
||||
__start_all_services
|
||||
exit ${exitCode:-$?}
|
||||
else
|
||||
__exec_command "$@"
|
||||
exitCode=$?
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# end of entrypoint
|
||||
exit ${exitCode:-$?}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
166
rootfs/usr/local/bin/start-cherokee.sh
Executable file
166
rootfs/usr/local/bin/start-cherokee.sh
Executable file
@@ -0,0 +1,166 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck shell=bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202210201649-git
|
||||
# @@Author : Jason Hempstead
|
||||
# @@Contact : jason@casjaysdev.com
|
||||
# @@License : LICENSE.md
|
||||
# @@ReadME : start-cherokee.sh --help
|
||||
# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments
|
||||
# @@Created : Thursday, Oct 20, 2022 16:49 EDT
|
||||
# @@File : start-cherokee.sh
|
||||
# @@Description : script to start cherokee
|
||||
# @@Changelog : New script
|
||||
# @@TODO : Better documentation
|
||||
# @@Other :
|
||||
# @@Resource :
|
||||
# @@Terminal App : no
|
||||
# @@sudo/root : no
|
||||
# @@Template : other/start-service
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set functions
|
||||
__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -x "$1" || return 1; }
|
||||
__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; }
|
||||
__curl() { curl -q -LSsf -o /dev/null -s -w "200" "$@" 2>/dev/null || return 10; }
|
||||
__pgrep() { __pcheck "$1" || ps aux 2>/dev/null | grep -Fw " $1" | grep -qv ' grep' || return 10; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__certbot() {
|
||||
[ -n "$DOMANNAME" ] && [ -n "$CERT_BOT_MAIL" ] || { echo "The variables DOMANNAME and CERT_BOT_MAIL are set" && exit 1; }
|
||||
[ "$SSL_CERT_BOT" = "true" ] && type -P certbot &>/dev/null || { export SSL_CERT_BOT="" && return 10; }
|
||||
certbot $1 --agree-tos -m $CERT_BOT_MAIL certonly --webroot -w "${WWW_ROOT_DIR:-/data/htdocs/www}" -d $DOMAINNAME -d $DOMAINNAME \
|
||||
--put-all-related-files-into "$SSL_DIR" -key-path "$SSL_KEY" -fullchain-path "$SSL_CERT"
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__heath_check() {
|
||||
status=0 health="Good"
|
||||
__pgrep ${1:-} || status=$((status + 1))
|
||||
#__curl "http://localhost:$HTTP_PORT/server-health" || status=$((status + 1))
|
||||
[ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME"
|
||||
echo "$(uname -s) $(uname -m) is running and the health is: $health"
|
||||
return ${status:-$?}
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set variables
|
||||
DISPLAY="${DISPLAY:-}"
|
||||
LANG="${LANG:-C.UTF-8}"
|
||||
DOMAINNAME="${DOMAINNAME:-}"
|
||||
TZ="${TZ:-America/New_York}"
|
||||
HTTP_PORT="${HTTP_PORT:-80}"
|
||||
HTTPS_PORT="${HTTPS_PORT:-}"
|
||||
SERVICE_PORT="${SERVICE_PORT:-$HTTP_PORT}"
|
||||
SERVICE_NAME="${CONTAINER_NAME:-}"
|
||||
HOSTNAME="${HOSTNAME:-casjaysdev-cherokee}"
|
||||
HOSTADMIN="${HOSTADMIN:-root@${DOMAINNAME:-$HOSTNAME}}"
|
||||
SSL_CERT_BOT="${SSL_CERT_BOT:-false}"
|
||||
SSL_ENABLED="${SSL_ENABLED:-false}"
|
||||
SSL_DIR="${SSL_DIR:-/config/ssl}"
|
||||
SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}"
|
||||
SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}"
|
||||
SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}"
|
||||
SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}"
|
||||
WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}"
|
||||
LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}"
|
||||
DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-}"
|
||||
CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-}"
|
||||
DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"
|
||||
DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}"
|
||||
DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}"
|
||||
CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')"
|
||||
[ -n "$HTTP_PORT" ] || [ -n "$HTTPS_PORT" ] || HTTP_PORT="$SERVICE_PORT"
|
||||
[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Overwrite variables
|
||||
#SERVICE_PORT=""
|
||||
SERVICE_NAME="cherokee"
|
||||
SERVICE_COMMAND="cherokee -C /etc/cherokee/cherokee.conf"
|
||||
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT"
|
||||
export PATH="/usr/local/share/cherokee/bin:/usr/local/share/cherokee/sbin:$PATH"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Pre copy commands
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Check if this is a new container
|
||||
[ -z "$DATA_DIR_INITIALIZED" ] && [ -f "/data/.docker_has_run" ] && DATA_DIR_INITIALIZED="true"
|
||||
[ -z "$CONFIG_DIR_INITIALIZED" ] && [ -f "/config/.docker_has_run" ] && CONFIG_DIR_INITIALIZED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Create default config
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_TEMPLATE_DIR" ]; then
|
||||
[ -d "/config" ] && cp -Rf "$DEFAULT_TEMPLATE_DIR/." "/config/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom config files
|
||||
if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_CONF_DIR" ]; then
|
||||
[ -d "/config" ] && cp -Rf "$DEFAULT_CONF_DIR/." "/config/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy custom data files
|
||||
if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_DATA_DIR" ]; then
|
||||
[ -d "/data" ] && cp -Rf "$DEFAULT_DATA_DIR/." "/data/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Copy html files
|
||||
if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "$DEFAULT_DATA_DIR/data/htdocs" ]; then
|
||||
[ -d "/data" ] && cp -Rf "$DEFAULT_DATA_DIR/data/htdocs/." "$WWW_ROOT_DIR/" 2>/dev/null
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Post copy commands
|
||||
[ -d "/data/cherokee/graphs" ] || mkdir -p "/data/cherokee/graphs"
|
||||
[ -d "/config/cherokee/themes" ] && cp -Rf "/config/cherokee/themes/." "/usr/local/share/cherokee/share/cherokee/themes/"
|
||||
[ -d "/usr/local/share/cherokee/icons" ] && [ ! -d "/config/cherokee/icons" ] && mkdir -p "/config/cherokee/icons" && cp -Rf "/usr/local/share/cherokee/icons/." "/config/cherokee/icons/"
|
||||
[ -d "/usr/local/share/cherokee/themes" ] && [ ! -d "/config/cherokee/themes" ] && mkdir -p "/config/cherokee/themes" && cp -Rf "/usr/local/share/cherokee/themes/." "/config/cherokee/themes/"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Initialized
|
||||
[ -d "/data" ] && touch "/data/.docker_has_run"
|
||||
[ -d "/config" ] && touch "/config/.docker_has_run"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# APP Variables overrides
|
||||
[ -f "/root/env.sh" ] && . "/root/env.sh"
|
||||
[ -f "/config/env.sh" ] && "/config/env.sh"
|
||||
[ -f "/config/.env.sh" ] && . "/config/.env.sh"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Actions based on env
|
||||
chmod -Rfv 664 "/data/cherokee"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# begin main app
|
||||
case "$1" in
|
||||
healthcheck)
|
||||
shift 1
|
||||
__heath_check "${SERVICE_NAME:-bash}"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
certbot)
|
||||
shift 1
|
||||
SSL_CERT_BOT="true"
|
||||
if [ "$1" = "create" ]; then
|
||||
shift 1
|
||||
__certbot
|
||||
elif [ "$1" = "renew" ]; then
|
||||
shift 1
|
||||
__certbot "renew certonly --force-renew"
|
||||
else
|
||||
__exec_command "certbot" "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if __pgrep "$SERVICE_NAME" && [ ! -f "/tmp/$SERVICE_NAME.pid" ]; then
|
||||
echo "$SERVICE_NAME is running"
|
||||
else
|
||||
touch "/tmp/$SERVICE_NAME.pid"
|
||||
echo "Starting cherokee-admin on port 9090"
|
||||
cherokee-admin -b -p 9090 -C /etc/cherokee/cherokee.conf &
|
||||
__exec_command "$SERVICE_COMMAND" || rm -Rf "/tmp/$SERVICE_NAME.pid"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set exit code
|
||||
exitCode="${exitCode:-$?}"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# End application
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# lets exit with code
|
||||
exit ${exitCode:-$?}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# end
|
@@ -0,0 +1,321 @@
|
||||
config!version = 001002104
|
||||
server!bind!1!port = 80
|
||||
server!collector = rrd
|
||||
server!keepalive = 1
|
||||
server!keepalive_max_requests = 500
|
||||
server!panic_action = /usr/local/share/cherokee/bin/cherokee-panic
|
||||
server!pid_file = /tmp/cherokee.pid
|
||||
server!post_track = post_track
|
||||
server!server_tokens = product
|
||||
server!timeout = 15
|
||||
vserver!1!collector!enabled = 1
|
||||
vserver!1!directory_index = index.html,index.html.var,index.php,index.cgi,index.asp,index.aspx,index.pl,index.aspx,Default.aspx,default.aspx,index.shtml,awstats.pl,index.unknown.php,index.default.php,index.txt,index.json
|
||||
vserver!1!document_root = /data/htdocs/www
|
||||
vserver!1!error_writer!filename = /data/cherokee/error.log
|
||||
vserver!1!error_writer!type = file
|
||||
vserver!1!evhost = evhost
|
||||
vserver!1!evhost!tpl_document_root = /data/htdocs/www/${domain}
|
||||
vserver!1!logger = combined
|
||||
vserver!1!logger!access!buffsize = 16384
|
||||
vserver!1!logger!access!filename = /data/cherokee/cherokee.access
|
||||
vserver!1!logger!access!type = file
|
||||
vserver!1!logger!x_real_ip_access = 0.0.0.0
|
||||
vserver!1!logger!x_real_ip_access_all = 0
|
||||
vserver!1!logger!x_real_ip_enabled = 1
|
||||
vserver!1!nick = default
|
||||
vserver!1!rule!60!encoder!gzip = allow
|
||||
vserver!1!rule!60!flcache = forbid
|
||||
vserver!1!rule!60!flcache!policy = explicitly_allowed
|
||||
vserver!1!rule!60!handler = fcgi
|
||||
vserver!1!rule!60!handler!balancer = round_robin
|
||||
vserver!1!rule!60!handler!balancer!source!10 = 1
|
||||
vserver!1!rule!60!handler!error_handler = 1
|
||||
vserver!1!rule!60!handler!x_real_ip_enabled = 1
|
||||
vserver!1!rule!60!match = extensions
|
||||
vserver!1!rule!60!match!check_local_file = 1
|
||||
vserver!1!rule!60!match!extensions = php
|
||||
vserver!1!rule!60!match!final = 0
|
||||
vserver!1!rule!60!timeout = 30
|
||||
vserver!1!rule!50!encoder!gzip = allow
|
||||
vserver!1!rule!50!handler = server_info
|
||||
vserver!1!rule!50!handler!type = just_about
|
||||
vserver!1!rule!50!match = directory
|
||||
vserver!1!rule!50!match!directory = /about
|
||||
vserver!1!rule!40!document_root = /data/htdocs/cgi-bin
|
||||
vserver!1!rule!40!handler = cgi
|
||||
vserver!1!rule!40!match = directory
|
||||
vserver!1!rule!40!match!directory = /cgi-bin
|
||||
vserver!1!rule!30!document_root = /usr/local/share/cherokee/share/cherokee/themes
|
||||
vserver!1!rule!30!handler = file
|
||||
vserver!1!rule!30!match = directory
|
||||
vserver!1!rule!30!match!directory = /cherokee_themes
|
||||
vserver!1!rule!20!document_root = /usr/local/share/cherokee/share/cherokee/icons
|
||||
vserver!1!rule!20!handler = file
|
||||
vserver!1!rule!20!match = directory
|
||||
vserver!1!rule!20!match!directory = /cherokee_icons
|
||||
vserver!1!rule!10!handler = common
|
||||
vserver!1!rule!10!handler!iocache = 1
|
||||
vserver!1!rule!10!match = default
|
||||
source!1!env!PHP_FCGI_CHILDREN = 5
|
||||
source!1!env!PHP_FCGI_MAX_REQUESTS = 490
|
||||
source!1!env_inherited = 0
|
||||
source!1!host = 127.0.0.1:9000
|
||||
source!1!interpreter = /usr/bin/php-cgi -b 127.0.0.1:9000
|
||||
source!1!nick = PHP Interpreter
|
||||
source!1!type = host
|
||||
icons!default = page_white.png
|
||||
icons!directory = folder.png
|
||||
icons!file!bomb.png = core
|
||||
icons!file!page_white_go.png = *README*
|
||||
icons!parent_directory = arrow_turn_left.png
|
||||
icons!suffix!camera.png = jpg,jpeg,jpe
|
||||
icons!suffix!cd.png = iso,ngr,cue
|
||||
icons!suffix!color_wheel.png = png,gif,xcf,bmp,pcx,tiff,tif,cdr,psd,xpm,xbm
|
||||
icons!suffix!control_play.png = bin,exe,com,msi,out
|
||||
icons!suffix!css.png = css
|
||||
icons!suffix!cup.png = java,class,jar
|
||||
icons!suffix!email.png = eml,mbox,box,email,mbx
|
||||
icons!suffix!film.png = avi,mpeg,mpe,mpg,mpeg3,dl,fli,qt,mov,movie,flv,webm
|
||||
icons!suffix!font.png = ttf
|
||||
icons!suffix!html.png = html,htm
|
||||
icons!suffix!music.png = au,snd,mid,midi,kar,mpga,mpega,mp2,mp3,sid,wav,aif,aiff,aifc,gsm,m3u,wma,wax,ra,rm,ram,pls,sd2,ogg
|
||||
icons!suffix!package.png = tar,gz,bz2,zip,rar,ace,lha,7z,dmg,cpk
|
||||
icons!suffix!page_white_acrobat.png = pdf
|
||||
icons!suffix!page_white_c.png = c,h,cpp
|
||||
icons!suffix!page_white_office.png = doc,ppt,xls
|
||||
icons!suffix!page_white_php.png = php
|
||||
icons!suffix!page_white_text.png = txt,text,rtf,sdw
|
||||
icons!suffix!printer.png = ps,eps
|
||||
icons!suffix!ruby.png = rb
|
||||
icons!suffix!script.png = sh,csh,ksh,tcl,tk,py,pl
|
||||
mime!application/bzip2!extensions = bz2
|
||||
mime!application/gzip!extensions = gz
|
||||
mime!application/hta!extensions = hta
|
||||
mime!application/java-archive!extensions = jar
|
||||
mime!application/java-serialized-object!extensions = ser
|
||||
mime!application/java-vm!extensions = class
|
||||
mime!application/json!extensions = json
|
||||
mime!application/mac-binhex40!extensions = hqx
|
||||
mime!application/msaccess!extensions = mdb
|
||||
mime!application/msword!extensions = doc,dot
|
||||
mime!application/octet-stream!extensions = bin
|
||||
mime!application/octetstream!extensions = ace
|
||||
mime!application/oda!extensions = oda
|
||||
mime!application/ogg!extensions = ogx
|
||||
mime!application/pdf!extensions = pdf
|
||||
mime!application/pgp-keys!extensions = key
|
||||
mime!application/pgp-signature!extensions = pgp
|
||||
mime!application/pics-rules!extensions = prf
|
||||
mime!application/postscript!extensions = ps,ai,eps
|
||||
mime!application/rar!extensions = rar
|
||||
mime!application/rdf+xml!extensions = rdf
|
||||
mime!application/rss+xml!extensions = rss
|
||||
mime!application/smil!extensions = smi,smil
|
||||
mime!application/vnd.mozilla.xul+xml!extensions = xul
|
||||
mime!application/vnd.ms-excel!extensions = xls,xlb,xlt
|
||||
mime!application/vnd.ms-pki.seccat!extensions = cat
|
||||
mime!application/vnd.ms-pki.stl!extensions = stl
|
||||
mime!application/vnd.ms-powerpoint!extensions = ppt,pps
|
||||
mime!application/vnd.oasis.opendocument.chart!extensions = odc
|
||||
mime!application/vnd.oasis.opendocument.database!extensions = odb
|
||||
mime!application/vnd.oasis.opendocument.formula!extensions = odf
|
||||
mime!application/vnd.oasis.opendocument.graphics!extensions = odg
|
||||
mime!application/vnd.oasis.opendocument.image!extensions = odi
|
||||
mime!application/vnd.oasis.opendocument.presentation!extensions = odp
|
||||
mime!application/vnd.oasis.opendocument.spreadsheet!extensions = ods
|
||||
mime!application/vnd.oasis.opendocument.text!extensions = odt
|
||||
mime!application/vnd.oasis.opendocument.text-master!extensions = odm
|
||||
mime!application/vnd.oasis.opendocument.text-web!extensions = oth
|
||||
mime!application/vnd.pkg5.info!extensions = p5i
|
||||
mime!application/vnd.visio!extensions = vsd
|
||||
mime!application/vnd.wap.wbxml!extensions = wbxml
|
||||
mime!application/vnd.wap.wmlc!extensions = wmlc
|
||||
mime!application/vnd.wap.wmlscriptc!extensions = wmlsc
|
||||
mime!application/x-7z-compressed!extensions = 7z
|
||||
mime!application/x-abiword!extensions = abw
|
||||
mime!application/x-apple-diskimage!extensions = dmg
|
||||
mime!application/x-bcpio!extensions = bcpio
|
||||
mime!application/x-bittorrent!extensions = torrent
|
||||
mime!application/x-cdf!extensions = cdf
|
||||
mime!application/x-cpio!extensions = cpio
|
||||
mime!application/x-csh!extensions = csh
|
||||
mime!application/x-debian-package!extensions = deb,udeb
|
||||
mime!application/x-director!extensions = dcr,dir,dxr
|
||||
mime!application/x-dvi!extensions = dvi
|
||||
mime!application/x-flac!extensions = flac
|
||||
mime!application/x-font!extensions = pfa,pfb,gsf,pcf,pcf.Z
|
||||
mime!application/x-freemind!extensions = mm
|
||||
mime!application/x-gnumeric!extensions = gnumeric
|
||||
mime!application/x-gtar!extensions = gtar,tgz,taz
|
||||
mime!application/x-gzip!extensions = gz,tgz
|
||||
mime!application/x-httpd-php!extensions = phtml,pht,php
|
||||
mime!application/x-httpd-php-source!extensions = phps
|
||||
mime!application/x-httpd-php3!extensions = php3
|
||||
mime!application/x-httpd-php3-preprocessed!extensions = php3p
|
||||
mime!application/x-httpd-php4!extensions = php4
|
||||
mime!application/x-internet-signup!extensions = ins,isp
|
||||
mime!application/x-iphone!extensions = iii
|
||||
mime!application/x-iso9660-image!extensions = iso
|
||||
mime!application/x-java-jnlp-file!extensions = jnlp
|
||||
mime!application/x-javascript!extensions = js
|
||||
mime!application/x-kchart!extensions = chrt
|
||||
mime!application/x-killustrator!extensions = kil
|
||||
mime!application/x-koan!extensions = skp,skd,skt,skm
|
||||
mime!application/x-kpresenter!extensions = kpr,kpt
|
||||
mime!application/x-kspread!extensions = ksp
|
||||
mime!application/x-kword!extensions = kwd,kwt
|
||||
mime!application/x-latex!extensions = latex
|
||||
mime!application/x-lha!extensions = lha
|
||||
mime!application/x-lzh!extensions = lzh
|
||||
mime!application/x-lzx!extensions = lzx
|
||||
mime!application/x-ms-wmd!extensions = wmd
|
||||
mime!application/x-ms-wmz!extensions = wmz
|
||||
mime!application/x-msdos-program!extensions = com,exe,bat,dll
|
||||
mime!application/x-msi!extensions = msi
|
||||
mime!application/x-netcdf!extensions = nc
|
||||
mime!application/x-ns-proxy-autoconfig!extensions = pac
|
||||
mime!application/x-nwc!extensions = nwc
|
||||
mime!application/x-object!extensions = o
|
||||
mime!application/x-oz-application!extensions = oza
|
||||
mime!application/x-pkcs7-certreqresp!extensions = p7r
|
||||
mime!application/x-pkcs7-crl!extensions = crl
|
||||
mime!application/x-python-code!extensions = pyc,pyo
|
||||
mime!application/x-quicktimeplayer!extensions = qtl
|
||||
mime!application/x-redhat-package-manager!extensions = rpm
|
||||
mime!application/x-sh!extensions = sh
|
||||
mime!application/x-shar!extensions = shar
|
||||
mime!application/x-shockwave-flash!extensions = swf,swfl
|
||||
mime!application/x-stuffit!extensions = sit,sea
|
||||
mime!application/x-sv4cpio!extensions = sv4cpio
|
||||
mime!application/x-sv4crc!extensions = sv4crc
|
||||
mime!application/x-tar!extensions = tar
|
||||
mime!application/x-tcl!extensions = tcl
|
||||
mime!application/x-tex-pk!extensions = pk
|
||||
mime!application/x-texinfo!extensions = texinfo,texi
|
||||
mime!application/x-trash!extensions = ~,bak,old,sik
|
||||
mime!application/x-troff!extensions = t,tr,roff
|
||||
mime!application/x-troff-man!extensions = man
|
||||
mime!application/x-troff-me!extensions = me
|
||||
mime!application/x-troff-ms!extensions = ms
|
||||
mime!application/x-ustar!extensions = ustar
|
||||
mime!application/x-x509-ca-cert!extensions = crt
|
||||
mime!application/x-xcf!extensions = xcf
|
||||
mime!application/x-xfig!extensions = fig
|
||||
mime!application/x-xpinstall!extensions = xpi
|
||||
mime!application/xhtml+xml!extensions = xhtml,xht
|
||||
mime!application/xml!extensions = xml,xsl
|
||||
mime!application/zip!extensions = zip
|
||||
mime!audio/basic!extensions = au,snd
|
||||
mime!audio/midi!extensions = mid,midi,kar
|
||||
mime!audio/mpeg!extensions = mpga,mpega,mp2,mp3,m4a
|
||||
mime!audio/ogg!extensions = ogg,oga
|
||||
mime!audio/prs.sid!extensions = sid
|
||||
mime!audio/x-aiff!extensions = aif,aiff,aifc
|
||||
mime!audio/x-gsm!extensions = gsm
|
||||
mime!audio/x-mpegurl!extensions = m3u
|
||||
mime!audio/x-ms-wax!extensions = wax
|
||||
mime!audio/x-ms-wma!extensions = wma
|
||||
mime!audio/x-pn-realaudio!extensions = ra,rm,ram
|
||||
mime!audio/x-realaudio!extensions = ra
|
||||
mime!audio/x-scpls!extensions = pls
|
||||
mime!audio/x-sd2!extensions = sd2
|
||||
mime!audio/x-wav!extensions = wav
|
||||
mime!chemical/x-cache!extensions = cac,cache
|
||||
mime!chemical/x-cache-csf!extensions = csf
|
||||
mime!chemical/x-cdx!extensions = cdx
|
||||
mime!chemical/x-cif!extensions = cif
|
||||
mime!chemical/x-cmdf!extensions = cmdf
|
||||
mime!chemical/x-cml!extensions = cml
|
||||
mime!chemical/x-compass!extensions = cpa
|
||||
mime!chemical/x-crossfire!extensions = bsd
|
||||
mime!chemical/x-csml!extensions = csml,csm
|
||||
mime!chemical/x-ctx!extensions = ctx
|
||||
mime!chemical/x-cxf!extensions = cxf,cef
|
||||
mime!chemical/x-isostar!extensions = istr,ist
|
||||
mime!chemical/x-jcamp-dx!extensions = jdx,dx
|
||||
mime!chemical/x-kinemage!extensions = kin
|
||||
mime!chemical/x-pdb!extensions = pdb,ent
|
||||
mime!chemical/x-swissprot!extensions = sw
|
||||
mime!chemical/x-vamas-iso14976!extensions = vms
|
||||
mime!chemical/x-vmd!extensions = vmd
|
||||
mime!chemical/x-xtel!extensions = xtel
|
||||
mime!chemical/x-xyz!extensions = xyz
|
||||
mime!image/gif!extensions = gif
|
||||
mime!image/jpeg!extensions = jpeg,jpg,jpe
|
||||
mime!image/pcx!extensions = pcx
|
||||
mime!image/png!extensions = png
|
||||
mime!image/svg+xml!extensions = svg,svgz
|
||||
mime!image/tiff!extensions = tiff,tif
|
||||
mime!image/vnd.djvu!extensions = djvu,djv
|
||||
mime!image/vnd.wap.wbmp!extensions = wbmp
|
||||
mime!image/x-icon!extensions = ico
|
||||
mime!image/x-ms-bmp!extensions = bmp
|
||||
mime!image/x-photoshop!extensions = psd
|
||||
mime!image/x-portable-anymap!extensions = pnm
|
||||
mime!image/x-portable-bitmap!extensions = pbm
|
||||
mime!image/x-portable-graymap!extensions = pgm
|
||||
mime!image/x-portable-pixmap!extensions = ppm
|
||||
mime!image/x-xbitmap!extensions = xbm
|
||||
mime!image/x-xpixmap!extensions = xpm
|
||||
mime!image/x-xwindowdump!extensions = xwd
|
||||
mime!model/iges!extensions = igs,iges
|
||||
mime!model/mesh!extensions = msh,mesh,silo
|
||||
mime!model/vrml!extensions = wrl,vrml
|
||||
mime!text/calendar!extensions = ics,icz
|
||||
mime!text/comma-separated-values!extensions = csv
|
||||
mime!text/css!extensions = css
|
||||
mime!text/h323!extensions = 323
|
||||
mime!text/html!extensions = html,htm,shtml
|
||||
mime!text/iuls!extensions = uls
|
||||
mime!text/mathml!extensions = mml
|
||||
mime!text/plain!extensions = asc,txt,text,diff,pot
|
||||
mime!text/richtext!extensions = rtx
|
||||
mime!text/rtf!extensions = rtf
|
||||
mime!text/scriptlet!extensions = sct,wsc
|
||||
mime!text/tab-separated-values!extensions = tsv
|
||||
mime!text/vnd.sun.j2me.app-descriptor!extensions = jad
|
||||
mime!text/vnd.wap.wml!extensions = wml
|
||||
mime!text/vnd.wap.wmlscript!extensions = wmls
|
||||
mime!text/x-boo!extensions = boo
|
||||
mime!text/x-c++hdr!extensions = h++,hpp,hxx,hh
|
||||
mime!text/x-c++src!extensions = c++,cpp,cxx,cc
|
||||
mime!text/x-chdr!extensions = h
|
||||
mime!text/x-csh!extensions = csh
|
||||
mime!text/x-csrc!extensions = c
|
||||
mime!text/x-dsrc!extensions = d
|
||||
mime!text/x-haskell!extensions = hs
|
||||
mime!text/x-java!extensions = java
|
||||
mime!text/x-literate-haskell!extensions = lhs
|
||||
mime!text/x-moc!extensions = moc
|
||||
mime!text/x-pascal!extensions = p,pas
|
||||
mime!text/x-pcs-gcd!extensions = gcd
|
||||
mime!text/x-perl!extensions = pl,pm
|
||||
mime!text/x-python!extensions = py
|
||||
mime!text/x-setext!extensions = etx
|
||||
mime!text/x-sh!extensions = sh
|
||||
mime!text/x-tcl!extensions = tcl,tk
|
||||
mime!text/x-tex!extensions = tex,ltx,sty,cls
|
||||
mime!text/x-vcalendar!extensions = vcs
|
||||
mime!text/x-vcard!extensions = vcf
|
||||
mime!video/dl!extensions = dl
|
||||
mime!video/dv!extensions = dif,dv
|
||||
mime!video/fli!extensions = fli
|
||||
mime!video/gl!extensions = gl
|
||||
mime!video/mp4!extensions = mp4
|
||||
mime!video/mpeg!extensions = mpeg,mpg,mpe
|
||||
mime!video/ogg!extensions = ogv
|
||||
mime!video/quicktime!extensions = qt,mov
|
||||
mime!video/vnd.mpegurl!extensions = mxu
|
||||
mime!video/webm!extensions = webm
|
||||
mime!video/x-flv!extensions = flv
|
||||
mime!video/x-la-asf!extensions = lsf,lsx
|
||||
mime!video/x-mng!extensions = mng
|
||||
mime!video/x-ms-asf!extensions = asf,asx
|
||||
mime!video/x-ms-wm!extensions = wm
|
||||
mime!video/x-ms-wmv!extensions = wmv
|
||||
mime!video/x-ms-wmx!extensions = wmx
|
||||
mime!video/x-ms-wvx!extensions = wvx
|
||||
mime!video/x-msvideo!extensions = avi
|
||||
mime!video/x-sgi-movie!extensions = movie
|
||||
mime!x-conference/x-cooltalk!extensions = ice
|
||||
mime!x-world/x-vrml!extensions = vrm,vrml,wrl
|
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="generator" content="CasjaysDev" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="description" content="" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
|
||||
/>
|
||||
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:type" content="" />
|
||||
<meta property="og:url" content="" />
|
||||
<meta property="og:image" content="" />
|
||||
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
|
||||
<link rel="icon" sizes="any" href="./images/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="./images/icon.svg" />
|
||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
<link rel="stylesheet" href="./css/errorpages.css" />
|
||||
|
||||
<script src="./js/errorpages/isup.js" defer></script>
|
||||
<script src="./js/errorpages/homepage.js" defer></script>
|
||||
<script src="./js/errorpages/loaddomain.js" defer></script>
|
||||
<script src="./js/jquery/default.js"></script>
|
||||
<script src="./js/passprotect.min.js" defer></script>
|
||||
<script src="./js/bootstrap.min.js" defer></script>
|
||||
<script src="./js/app.js" defer></script>
|
||||
|
||||
<title>404 Not Found</title>
|
||||
</head>
|
||||
|
||||
<body onload="javascript:loadDomain();">
|
||||
<!-- Error Page Content -->
|
||||
<div class="container vh-100">
|
||||
<div class="jumbotron">
|
||||
<h1>
|
||||
<i class="fa fa-frown-o red"></i>
|
||||
<a
|
||||
href="https://www.google.com/search?q=server+error+404"
|
||||
target="_blank"
|
||||
>404 Not Found</a
|
||||
>
|
||||
</h1>
|
||||
<p class="lead">
|
||||
We apologize but we can't seem to be able to find what you're looking
|
||||
for!
|
||||
</p>
|
||||
|
||||
<img
|
||||
alt="error"
|
||||
src="./images/404.gif"
|
||||
height="350"
|
||||
width="auto"
|
||||
/><br />
|
||||
</div>
|
||||
|
||||
<a
|
||||
onclick="javascript:homepage();"
|
||||
class="btn btn-secondary btn-outline-danger btn-lg btn-block"
|
||||
><span id="display-domain"></span
|
||||
></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
10531
rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css
vendored
Normal file
10531
rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,342 @@
|
||||
@import url(
|
||||
https://fonts.googleapis.com/css?family=Lato:300italic,
|
||||
700italic,
|
||||
300,
|
||||
700
|
||||
);
|
||||
|
||||
body {
|
||||
padding: 50px;
|
||||
font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #777;
|
||||
font-weight: 300;
|
||||
padding: 1.5em 0;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.jumbotron {
|
||||
line-height: 2.1428571435;
|
||||
color: inherit;
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
/* Main marketing message and sign up button */
|
||||
.jumbotron {
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.jumbotron .btn {
|
||||
font-size: 21px;
|
||||
padding: 1.5em 2em;
|
||||
}
|
||||
|
||||
/* Everything but the jumbotron gets side spacing for mobile-first views */
|
||||
.masthead,
|
||||
.body-content {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/* Colors */
|
||||
.green {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.orange {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #222;
|
||||
margin: 0 0 40px;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
table,
|
||||
pre,
|
||||
dl {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
line-height: 1.1;
|
||||
text-align: center;
|
||||
font: Lato;
|
||||
font-size: 80px;
|
||||
color: #222;
|
||||
margin: 0 0 40px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #393939;
|
||||
}
|
||||
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #39c;
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a small {
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
margin-top: -0.6em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 860px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 1px solid #e5e5e5;
|
||||
margin: 0;
|
||||
padding: 0 0 0 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 8px 15px;
|
||||
background: #f8f8f8;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #e5e5e5;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
text-align: left;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
dt {
|
||||
color: #444;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
th {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 270px;
|
||||
float: left;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
header ul {
|
||||
list-style: none;
|
||||
height: 40px;
|
||||
|
||||
padding: 0;
|
||||
|
||||
background: #eee;
|
||||
background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: -webkit-gradient(
|
||||
linear,
|
||||
left top,
|
||||
left bottom,
|
||||
color-stop(0%, #f8f8f8),
|
||||
color-stop(100%, #dddddd)
|
||||
);
|
||||
background: -webkit-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: -o-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: -ms-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
background: linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
|
||||
|
||||
border-radius: 5px;
|
||||
border: 1px solid #d2d2d2;
|
||||
box-shadow: inset #fff 0 1px 0, inset rgba(0, 0, 0, 0.03) 0 -1px 0;
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
header li {
|
||||
width: 89px;
|
||||
float: left;
|
||||
border-right: 1px solid #d2d2d2;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
header ul a {
|
||||
line-height: 1;
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 6px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: #222;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
header ul li + li {
|
||||
width: 88px;
|
||||
border-left: 1px solid #fff;
|
||||
}
|
||||
|
||||
header ul li + li + li {
|
||||
border-right: none;
|
||||
width: 89px;
|
||||
}
|
||||
|
||||
header ul a strong {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
section {
|
||||
width: 500px;
|
||||
float: right;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
background: #e5e5e5;
|
||||
height: 1px;
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 270px;
|
||||
float: left;
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 960px) {
|
||||
div.wrapper {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header,
|
||||
section,
|
||||
footer {
|
||||
float: none;
|
||||
position: static;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-right: 320px;
|
||||
}
|
||||
|
||||
section {
|
||||
border: 1px solid #e5e5e5;
|
||||
border-width: 1px 0;
|
||||
padding: 20px 0;
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
header a small {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
header ul {
|
||||
position: absolute;
|
||||
right: 50px;
|
||||
top: 52px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 720px) {
|
||||
body {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header ul,
|
||||
header p.view {
|
||||
position: static;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
word-wrap: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 480px) {
|
||||
body {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
header ul {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
padding: 0.4in;
|
||||
font-size: 12pt;
|
||||
color: #444;
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700);
|
||||
@import url(./bootstrap.min.css);
|
||||
|
||||
body {
|
||||
color: purple;
|
||||
background-image: url('../images/bg.png');
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #333;
|
||||
color: #ffffff;
|
||||
border-top: 1px solid #678ca0;
|
||||
vertical-align: middle;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: 333;
|
||||
border-top: 1px solid #678ca0;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 1px solid #678ca0;
|
||||
padding: 0px;
|
||||
width: 100%;
|
||||
background-color: #333;
|
||||
margin-bottom: 10px;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.leftspacer {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.serviceup {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.servicedown {
|
||||
color: red;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #5d83a9;
|
||||
}
|
||||
|
||||
p.main {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #c39;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #c0f;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
@@ -0,0 +1 @@
|
||||
./images/favicon.ico
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 766 B |
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 192 192"><path fill="#e08524" d="M75.3 73.4H18.4l45.3 34.3L48.3 163l46.1-32.3 48.2 34.6-16.9-58.3 44.9-33.6H115l-20.5-55-19.2 55z"/><path d="m96.7 18.8 18.2 8.2 16.5 44.3h-15.1L96.7 18.8zm-47 146 18.7 9.9 42.6-29.9-16.5-11.4-44.8 31.4zm79.1-56.8 17.4 9.4 18.6 60.1-19.7-11.3-16.3-58.2z"/><path d="m173.1 74.3 17.8 9.2-44.7 34-17.4-9.4 44.3-33.8z"/></svg>
|
After Width: | Height: | Size: 429 B |
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="generator" content="CasjaysDev" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="description" content="" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
|
||||
/>
|
||||
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:type" content="" />
|
||||
<meta property="og:url" content="" />
|
||||
<meta property="og:image" content="" />
|
||||
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
|
||||
<link rel="icon" sizes="any" href="./images/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="./images/icon.svg" />
|
||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
|
||||
<script src="./js/errorpages/isup.js" defer></script>
|
||||
<script src="./js/errorpages/homepage.js" defer></script>
|
||||
<script src="./js/errorpages/loaddomain.js" defer></script>
|
||||
<script src="./js/jquery/default.js"></script>
|
||||
<script src="./js/passprotect.min.js" defer></script>
|
||||
<script src="./js/bootstrap.min.js" defer></script>
|
||||
<script src="./js/app.js" defer></script>
|
||||
|
||||
<title>Welcome</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-center">
|
||||
<h1 class="m-5">Congratulations</h1>
|
||||
<h2>
|
||||
Your cherokee container has been setup.<br /><br /><br /><br /><br />
|
||||
</h2>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="generator" content="CasjaysDev" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:type" content="" />
|
||||
<meta property="og:url" content="" />
|
||||
<meta property="og:image" content="" />
|
||||
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
|
||||
<link rel="icon" sizes="any" href="./images/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="./images/icon.svg" />
|
||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
|
||||
<script src="./js/errorpages/isup.js" defer></script>
|
||||
<script src="./js/errorpages/homepage.js" defer></script>
|
||||
<script src="./js/errorpages/loaddomain.js" defer></script>
|
||||
<script src="./js/jquery/default.js"></script>
|
||||
<script src="./js/passprotect.min.js" defer></script>
|
||||
<script src="./js/bootstrap.min.js" defer></script>
|
||||
<script src="./js/app.js" defer></script>
|
||||
|
||||
<title>Welcome</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-center">
|
||||
<h1 class="m-5">Congratulations</h1>
|
||||
<php phpinfo(); ?>
|
||||
<br /><br /><br /><br /><br />
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
4075
rootfs/usr/local/share/template-files/data/htdocs/www/js/bootstrap.min.js
vendored
Normal file
4075
rootfs/usr/local/share/template-files/data/htdocs/www/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
function homepage() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let currentSite = window.location.hostname;
|
||||
window.location = proto + '//' + currentSite + ':' + port;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
function isupme() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let currentSite = window.location.hostname;
|
||||
fullurllocation = proto + '//' + currentSite + ':' + port;
|
||||
window.location = 'http://isup.me/' + fullurllocation;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
function loadDomain() {
|
||||
let proto = location.protocol;
|
||||
let port = location.port;
|
||||
let url = location.hostname;
|
||||
var display = document.getElementById('display-domain');
|
||||
display.innerHTML = proto + '//' + url + ':' + port;
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
var metas = document.getElementsByTagName('meta');
|
||||
var i;
|
||||
if (navigator.userAgent.match(/iPhone/i)) {
|
||||
for (i = 0; i < metas.length; i++) {
|
||||
if (metas[i].name == 'viewport') {
|
||||
metas[i].content =
|
||||
'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
|
||||
}
|
||||
}
|
||||
document.addEventListener('gesturestart', gestureStart, false);
|
||||
}
|
||||
|
||||
function gestureStart() {
|
||||
for (i = 0; i < metas.length; i++) {
|
||||
if (metas[i].name == 'viewport') {
|
||||
metas[i].content =
|
||||
'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
|
||||
}
|
||||
}
|
||||
}
|
5540
rootfs/usr/local/share/template-files/data/htdocs/www/js/jquery/default.js
vendored
Normal file
5540
rootfs/usr/local/share/template-files/data/htdocs/www/js/jquery/default.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2294
rootfs/usr/local/share/template-files/data/htdocs/www/js/passprotect.min.js
vendored
Normal file
2294
rootfs/usr/local/share/template-files/data/htdocs/www/js/passprotect.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
ok
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"status": "ok"
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"short_name": "",
|
||||
"name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./images/icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
}
|
||||
],
|
||||
"start_url": "/",
|
||||
"background_color": "#000000",
|
||||
"theme_color": "#ffffff"
|
||||
}
|
Reference in New Issue
Block a user