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]>
weearc and Hagb authored Aug 29, 2021

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
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
@@ -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.
@@ -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
@@ -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
@@ -589,7 +589,7 @@ config_file_check() {
exit
fi



}

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

clean_up
setup_packages
setup_drcom
@@ -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."

0 comments on commit 4fcc2c4

Please sign in to comment.