Browse Source

clarified folder structure and naming

and created upstart script for /etc/init.d
master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
c05f818ebf
  1. 29
      etc/change_world_name_manually_first/WIP (DO NOT USE)/redis-mtredisalize-start
  2. 15
      etc/change_world_name_manually_first/also_change_username_manually_first/WIP (do not use)/nightly-cronjob
  3. 22
      etc/change_world_name_manually_first/also_change_username_manually_first/backup-mts-world_cron
  4. 24
      etc/change_world_name_manually_first/backup-mts-world
  5. 2
      etc/change_world_name_manually_first/eauth
  6. 8
      etc/change_world_name_manually_first/editmtsconf
  7. 1839
      etc/change_world_name_manually_first/game-install-ENLIVEN
  8. 1101
      etc/change_world_name_manually_first/game-install-ENLIVEN.old
  9. 8
      etc/change_world_name_manually_first/mts-ENLIVEN
  10. 3
      etc/change_world_name_manually_first/mts-ENLIVEN.old
  11. 18
      etc/change_world_name_manually_first/nightly-sudoer-script
  12. 5
      etc/change_world_name_manually_first/use if you want/log_clear_mysql

29
etc/change_world_name_manually_first/WIP (DO NOT USE)/redis-mtredisalize-start

@ -1,29 +0,0 @@
#!/bin/sh
USR_SHARE_MINETEST=/usr/share/games/minetest
#IF git version is installed:
if [ -d "/usr/local/share/minetest" ];
then
USR_SHARE_MINETEST=/usr/local/share/minetest
fi
#UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods
#intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one:
MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games
MT_GAMES_DIR=$USR_SHARE_MINETEST/games
MT_MYGAME_NAME=ENLIVEN
MT_MYGAME_DIR=$MT_GAMES_DIR/$MT_MYGAME_NAME
MT_MYGAME_MODDIR=$MT_MYGAME_DIR/mods
MT_MYWORLD_NAME=FCAGameAWorld
MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME
if [ ! -d "$MT_MYGAME_DIR" ]; then
sudo mkdir "$MT_MYGAME_DIR"
fi
mtredisalize \
-host=localhost \
-interleaved=true \
-change-url=http://localhost:8808/update \
-change-duration=10s \
$MT_MYWORLD_DIR/map.db

15
etc/change_world_name_manually_first/also_change_username_manually_first/WIP (do not use)/nightly-cronjob

@ -1,15 +0,0 @@
#!/bin/sh
#To add this, type:
# sudo crontab -e
# #Go to bottom, then to run at 9pm daily:
# * 21 * * * /home/owner/nightly-cronjob
# #Press Ctrl-X
# #Press y
killall --signal SIGINT minetestserver
#chunkymap, if present, must run as root.
python chunkymap/singleimage.py
cd /home/owner
# NOTE: sudo -u owner doesn't work, since $HOME is still root in that case ($HOME is used extensively by the scripts and programs below)
su - owner ./archive-mts-debug
su - owner ./backup-mts-world
su - owner /home/owner/mts-ENLIVEN

22
etc/change_world_name_manually_first/also_change_username_manually_first/backup-mts-world_cron

@ -1,22 +0,0 @@
#!/bin/sh
date_string=`date +%Y-%m-%d`
MT_WORLDS_PATH=/home/owner/.minetest/worlds
cd $MT_WORLDS_PATH
ls
dest_name=FCAGameAWorld-$date_string.tar.gz
dest_path=$MT_WORLDS_PATH/$dest_name
echo "Attempting to create $name_string"
if [ ! -f "$name_string" ]
then
cd "$MT_WORLDS_PATH"
tar -czvf "$dest_name" FCAGameAWorld
if [ -f "$dest_path" ]
then
echo "Successfully created $dest_path" > $HOME/backup-FCAGAW-result.txt >> /var/log/minetestserver-scripts.log
else
echo "Failed to create $dest_path" > $HOME/backup-FCAGAW-result.txt >> /var/log/minetestserver/scripts.log
fi
else
echo "Nothing to do. Already saved $MT_WORLDS_PATH/$name_string" >> /var/log/minetestserver-scripts.log
fi

24
etc/change_world_name_manually_first/backup-mts-world

@ -1,24 +0,0 @@
#!/bin/sh
# Copyright 2017 expertmm
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
date_string=`date +%Y-%m-%d`
MT_WORLDS_PATH=$HOME/.minetest/worlds
cd $MT_WORLDS_PATH
ls
name_string=FCAGameAWorld-$date_string.tar.gz
echo "Attempting to create $name_string"
if [ ! -f "$name_string" ]
then
tar -czvf "$name_string" FCAGameAWorld
if [ -f "$name_string" ]
then
echo "Successfully created $MT_WORLDS_PATH/$name_string"
else
echo "Failed to create $MT_WORLDS_PATH/$name_string"
fi
else
echo "Nothing to do. Already saved $MT_WORLDS_PATH/$name_string"
fi

2
etc/change_world_name_manually_first/eauth

@ -1,2 +0,0 @@
#!/bin/sh
nano ~/.minetest/worlds/FCAGameAWorld/auth.txt

8
etc/change_world_name_manually_first/editmtsconf

@ -1,8 +0,0 @@
#!/bin/sh
USR_SHARE_MINETEST=/usr/share/games/minetest
if [ -d "/usr/local/share/minetest" ];
then
USR_SHARE_MINETEST=/usr/local/share/minetest
fi
MT_MYGAME_NAME=ENLIVEN
sudo nano "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf"

1839
etc/change_world_name_manually_first/game-install-ENLIVEN

File diff suppressed because it is too large

1101
etc/change_world_name_manually_first/game-install-ENLIVEN.old

File diff suppressed because it is too large

8
etc/change_world_name_manually_first/mts-ENLIVEN

@ -1,8 +0,0 @@
#!/bin/sh
#BROKEN: screen -t MinetestServer minetestserver --gameid minetest_next --draworigin --drawplayers --world FCAWorldMTNext
#BROKEN: screen -t MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld
#NOTE: if only title is set, screen -x must be used to resume, so use -S <name> to resume with -r <name>
#screen -S MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld
#screen -S MinetestServer /home/owner/minetest/bin/minetestserver --gameid ENLIVEN --worldname FCAGameAWorld
screen -S MinetestServer $HOME/minetest/bin/minetestserver --gameid ENLIVEN --worldname FCAGameAWorld

3
etc/change_world_name_manually_first/mts-ENLIVEN.old

@ -1,3 +0,0 @@
#!/bin/sh
#BROKEN: screen -t MinetestServer minetestserver --gameid minetest_next --draworigin --drawplayers --world FCAWorldMTNext
screen -t MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld

18
etc/change_world_name_manually_first/nightly-sudoer-script

@ -1,18 +0,0 @@
#!/bin/sh
#run this as sudoer
killall --signal SIGINT minetestserver
sudo python chunkymap/singleimage.py
./archive-mts-debug
./backup-mts-world
./mts-ENLIVEN
#su - owner /home/owner/mts-ENLIVEN
if [ -f "log_clear_mysql" ]; then
./log_clear_mysql
fi
#also try:
#cd /var/log
#sudo du -hsx .[^.]* * | sort -rh | head -20
#automatically done by chunkymap now:
#sudo rm /var/www/html/minetest/chunkymapdata/worlds/FCAGameAWorld/singleimage.png

5
etc/change_world_name_manually_first/use if you want/log_clear_mysql

@ -1,5 +0,0 @@
#!/bin/sh
sudo rm /var/log/mysql/error.log.*.gz
sudo rm /var/log/mysql/error.log.1
sudo rm /var/log/*.log.*.gz
sudo rm /var/log/*.log.1
Loading…
Cancel
Save