浏览代码

Argument checks

Bob Mottram 10 年前
父节点
当前提交
787b369ca0
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
    0
      install-freedombone.sh

+ 12
- 0
install-freedombone.sh 查看文件

9
 
9
 
10
 export DEBIAN_FRONTEND=noninteractive
10
 export DEBIAN_FRONTEND=noninteractive
11
 
11
 
12
+function argument_checks {
13
+  if [ ! $DOMAIN_NAME ]; then
14
+	  echo "Please specify your domain name"
15
+	  exit
16
+  fi
17
+  if [ ! $MY_USERNAME ]; then
18
+	  echo "Please specify your username"
19
+	  exit
20
+  fi
21
+}
22
+
12
 function initial_setup {
23
 function initial_setup {
13
   apt-get -y update
24
   apt-get -y update
14
   apt-get -y dist-upgrade
25
   apt-get -y dist-upgrade
685
   chmod +x /usr/bin/emailrule
696
   chmod +x /usr/bin/emailrule
686
 }
697
 }
687
 
698
 
699
+argument_checks
688
 initial_setup
700
 initial_setup
689
 install_editor
701
 install_editor
690
 enable_backports
702
 enable_backports