[BACK]Return to mtctl_default.sh CVS log [TXT][DIR] Up to [local] / mtctl

Diff for /mtctl/mtctl_default.sh between version 1.9 and 1.10

version 1.9, 2023/05/02 18:04:20 version 1.10, 2023/05/02 18:59:16
Line 3 
Line 3 
 # Purpose: Minetest Server Control  # Purpose: Minetest Server Control
 # License: Copyright (C) 2021-2022 by Miniontoby <miniontoby@ircnow.org>  # License: Copyright (C) 2021-2022 by Miniontoby <miniontoby@ircnow.org>
 #---------------------------------------------------------------------  #---------------------------------------------------------------------
 VERSION="1.6"  VERSION="1.6.1"
 config=[]  config=[]
 config[0]="no"; config[1]="/usr/local/share/minetest/"  config[0]="no"; config[1]="/usr/local/share/minetest/"
   
Line 297  enableMT() {
Line 297  enableMT() {
         if [[ $(crontab -l | egrep -v "^(#|$)" | grep -q '/usr/bin/mtctl startup'; echo $?) == 1 ]]; then          if [[ $(crontab -l | egrep -v "^(#|$)" | grep -q '/usr/bin/mtctl startup'; echo $?) == 1 ]]; then
                 set -f                  set -f
                 crontab -l > temp                  crontab -l > temp
                 echo '@reboot rm $HOME/.mtctl/.booted 2>/dev/null && /usr/bin/mtctl startup' >> temp                  echo '@reboot rm $HOME/.mtctl/.booted 2>/dev/null; /usr/bin/mtctl startup' >> temp
                 cat temp | crontab -                  cat temp | crontab -
                 rm temp                  rm temp
                 set +f                  set +f
Line 357  case $ACTION in
Line 357  case $ACTION in
                 startupMT                  startupMT
                 ;;                  ;;
         enable)          enable)
                 #mtsetup                  mtsetup
                 enableMT "$2"                  enableMT "$2"
                 ;;                  ;;
         disable)          disable)
                 #mtsetup                  mtsetup
                 disableMT "$2"                  disableMT "$2"
                 ;;                  ;;
         version)          version)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

CVSweb