mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-25 00:01:51 +00:00
22 lines
1.0 KiB
Bash
22 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
||
set -Eeuo pipefail
|
||
|
||
info () { printf "%b%s%b" "\E[1;34m❯ \E[1;36m" "$1" "\E[0m\n"; }
|
||
error () { printf "%b%s%b" "\E[1;31m❯ " "ERROR: $1" "\E[0m\n" >&2; }
|
||
warn () { printf "%b%s%b" "\E[1;31m❯ " "Warning: $1" "\E[0m\n"; }
|
||
|
||
trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
|
||
|
||
# Docker environment variables
|
||
: "${CPU_COUNT:="1"}" # Number of virtualized CPUs
|
||
: "${RAM_COUNT:="256"}" # Amount of memory
|
||
: "${WAN_IF:=""}" # Physical WAN interface name
|
||
: "${LAN_IF:=""}" # Physical LAN interface name
|
||
: "${USB_1:=""}" # USB 1 vendor and device ID
|
||
: "${USB_2:=""}" # USB 2 vendor and device ID
|
||
: "${PCI_1:=""}" # PCI 1 slot (first number in lspci)
|
||
: "${FORWARD_LUCI:=""}" # Make LuCI OpenWrt web interface accessible via host LAN
|
||
: "${OPENWRT_AFTER_BOOT_CMD:=""}" # User command or script to run after OpenWrt is booted
|
||
: "${IS_U_OS_APP:=""}" # By default this container is not a u-OS app
|
||
: "${DEBUG:="N"}" # Disable debugging
|