version 1.9, 2023/05/02 18:04:20 |
version 1.10, 2023/05/02 18:59:16 |
|
|
# 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/" |
|
|
|
|
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 |
|
|
startupMT |
startupMT |
;; |
;; |
enable) |
enable) |
#mtsetup |
mtsetup |
enableMT "$2" |
enableMT "$2" |
;; |
;; |
disable) |
disable) |
#mtsetup |
mtsetup |
disableMT "$2" |
disableMT "$2" |
;; |
;; |
version) |
version) |