poikilos
7 years ago
committed by
Jacob Gustafson
14 changed files with 3090 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||
start on (filesystem and stopped udevtrigger) |
|||
stop on runlevel [06] |
|||
|
|||
setuid owner |
|||
respawn |
|||
|
|||
exec /home/owner/mts-ENLIVEN |
@ -0,0 +1,5 @@ |
|||
#!/bin/sh |
|||
|
|||
#enable the mts-ENLIVEN upstart service (after you've copied it) on Ubuntu: |
|||
sudo service mts-ENLIVEN enable |
|||
sudo service mts-ENLIVEN start |
@ -0,0 +1,15 @@ |
|||
#!/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 |
@ -0,0 +1,22 @@ |
|||
#!/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 |
@ -0,0 +1,29 @@ |
|||
#!/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 |
|||
|
@ -0,0 +1,24 @@ |
|||
#!/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 |
@ -0,0 +1,2 @@ |
|||
#!/bin/sh |
|||
nano ~/.minetest/worlds/FCAGameAWorld/auth.txt |
@ -0,0 +1,8 @@ |
|||
#!/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" |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,8 @@ |
|||
#!/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 |
|||
|
@ -0,0 +1,3 @@ |
|||
#!/bin/sh |
|||
#BROKEN: screen -t MinetestServer minetestserver --gameid minetest_next --draworigin --drawplayers --world FCAWorldMTNext |
|||
screen -t MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld |
@ -0,0 +1,18 @@ |
|||
#!/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 |
@ -0,0 +1,5 @@ |
|||
#!/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…
Reference in new issue