Commit 3fe54fe00c06f23697ef49a0843f9460c862a63e

Authored by Clang
Committed by GitHub
1 parent d77567db
Exists in master

Update ngrokd.init

Showing 1 changed file with 9 additions and 20 deletions   Show diff stats
ngrokd.init
... ... @@ -30,7 +30,7 @@ LOGFILE=${ProGramInstallPath}/ngrok.log
30 30 SCRIPTNAME=/etc/init.d/${NAME}
31 31 PID_DIR=/var/run
32 32 PID_FILE=$PID_DIR/ngrok_clang.pid
33   -version="6.0"
  33 +version="7.0"
34 34 manage_port="4446"
35 35 RET_VAL=0
36 36  
... ... @@ -39,13 +39,11 @@ RET_VAL=0
39 39 fun_clangcn()
40 40 {
41 41 echo ""
42   - echo "#############################################################"
43   - echo "# Manager Ngrok v${version} for CentOS/Debian/Ubuntu (32bit/64bit)"
44   - echo "# Intro: http://clang.cn"
45   - echo "#"
46   - echo "# Author: Clang <admin@clangcn.com>"
47   - echo "#"
48   - echo "#############################################################"
  42 + echo "+----------------------------------------------+"
  43 + echo "| Manager for Ngrok, Written by Clang |"
  44 + echo "+----------------------------------------------+"
  45 + echo "| Intro: http://clang.cn/ |"
  46 + echo "+----------------------------------------------+"
49 47 echo ""
50 48 }
51 49  
... ... @@ -176,11 +174,8 @@ checkos(){
176 174 fi
177 175 }
178 176 check_nano(){
179   - nano -V
180   - #echo $?
181   - if [[ $? -le 1 ]] ;then
182   - echo " Run nano success"
183   - else
  177 + nano -V >/dev/null
  178 + if [[ $? -gt 1 ]] ;then
184 179 echo " Run nano failed"
185 180 checkos
186 181 if [ "${OS}" == 'CentOS' ]; then
... ... @@ -193,11 +188,6 @@ check_nano(){
193 188 apt-get install -y nano
194 189 fi
195 190 fi
196   - # if [[ ! -d "$result" ]]; then
197   - # echo "not found"
198   - # else
199   - # echo "found"
200   - # fi
201 191 echo $result
202 192 }
203 193 fun_config(){
... ... @@ -355,7 +345,7 @@ deluser_Confirm_clang(){
355 345 if [ $strConfirmDel = "y" ]; then
356 346 if [ -s "/tmp/db-diskv/ng/ro/ngrok:${strDelUser}" ]; then
357 347 rm -f /tmp/db-diskv/ng/ro/ngrok:${strDelUser}
358   - echo "Delete user ${strDelUser}¡¡ok! Restart ${NAME}..."
  348 + echo "Delete user ${strDelUser} ok! Restart ${NAME}..."
359 349 fun_restart
360 350 else
361 351 echo ""
... ... @@ -394,4 +384,3 @@ case &quot;${arg1}&quot; in
394 384 ;;
395 385 esac
396 386 exit $RET_VAL
397   -
... ...