diff --git a/README.md b/README.md index 2eca77e..7ba67b1 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ A searchable package list is available on [openwrt.org](https://openwrt.org/pack ## Configure -Configuration is performed using a config file, `.env`. Values read from this file at runtime are used to generate OpenWRT format config files. +Configuration is performed using a config file, `openwrt.conf`. Values read from this file at runtime are used to generate OpenWRT format config files. To add or change a configuration, modify the config templates in `etc/config/
.tpl`. diff --git a/run.sh b/run.sh index fa8b8c6..3d8dd87 100755 --- a/run.sh +++ b/run.sh @@ -1,13 +1,16 @@ #!/bin/bash # set -x -source openwrt.conf || { echo 'no config file found! use openwrt.conf.example for inspiration'; exit 1; } function _usage() { - echo "$0 [interface_name]" + echo "Could not find config file." + echo "Usage: $0 [/path/to/openwrt.conf]" exit 1 } +CONFIG_FILE=${1:-"openwrt.conf"} +source $CONFIG_FILE 2>/dev/null || { _usage; exit 1; } + function _nmcli() { type nmcli >/dev/null 2>&1 if [[ $? -eq 0 ]]; then