Skip to content

Commit

Permalink
Dev (#36)
Browse files Browse the repository at this point in the history
* Add hook to prevent to be kicked (#31)

* Add hook to prevent to be kicked

* Support for different warning count

* Enable silent install function

* fix some functions

* fix config file support (#33)

Co-authored-by: Hagb (Guo Junyu 郭俊余) <[email protected]>
  • Loading branch information
weearc and Hagb authored Aug 29, 2021
1 parent c2504f4 commit 4fcc2c4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DRCOMLOG=/var/log/drcom.log
NETLOG=/var/log/networkChecking.log
DRCOM_PID=/var/run/drcom-wrapper.pid
ERROR_LOG=/var/log/install-error.log
VERSION_CQU_DRCOM='2.3.1b'
VERSION_CQU_DRCOM='2.3.2b'

# for cli options
# "-" option is to rewrite long options which getopts do not support.
Expand Down Expand Up @@ -561,8 +561,8 @@ setup_done_debug() {
}

config_file_check() {
CLIENT=$client
ifSet_cron=$set_cron
CLIENT="$client"
ifSet_cron="$set_cron"
if [[ $ifSet_cron -eq 0 ]]
then
ifSet_cron=no
Expand All @@ -574,12 +574,12 @@ config_file_check() {
echo "Error, value campus with $campus is not allowed. Please check ." >> $ERROR_LOG
exit
fi
if [[ $wifi_ssid0 -eq 0 ]]

if [ -z "$wifi_ssid0" ];
then
wifi_ssid0="openwrt"
fi
if [[ $wifi_ssid1 -eq 0 ]]
if [ -z "$wifi_ssid1" ];
then
wifi_ssid0="openwrt_5Ghz"
fi
Expand All @@ -589,7 +589,7 @@ config_file_check() {
exit
fi



}

Expand Down Expand Up @@ -657,6 +657,8 @@ else # When running with options
eval "$line"
done < config.ini
hello
config_file_check

clean_up
setup_packages
setup_drcom
Expand Down Expand Up @@ -689,6 +691,7 @@ else # When running with options
;;
h)
echo "USAGE: sh ./setup.sh [options]"
echo ""
echo "-V, --dry-run Verbose. Run the scripts without actually setting up."
echo "-f, --file Use config file to install automatically"
echo "-h, --help Display this message."
Expand Down

0 comments on commit 4fcc2c4

Please sign in to comment.