mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
rewrite and improve all start/update/upgrade scripts
This commit is contained in:
parent
ce8ea83036
commit
d446131d93
0
other_things/scripts/Server-side/script/news-mff-rsync.sh
Executable file → Normal file
0
other_things/scripts/Server-side/script/news-mff-rsync.sh
Executable file → Normal file
2
other_things/scripts/Server-side/script/start-mff-hg.sh
Executable file → Normal file
2
other_things/scripts/Server-side/script/start-mff-hg.sh
Executable file → Normal file
@ -18,7 +18,7 @@ while true
|
|||||||
/home/quentinbd/mff-hg/bin/minetestserver \
|
/home/quentinbd/mff-hg/bin/minetestserver \
|
||||||
--world /home/quentinbd/mff-hg/worlds/minetestforfun-hg/ \
|
--world /home/quentinbd/mff-hg/worlds/minetestforfun-hg/ \
|
||||||
--config /home/quentinbd/mff-hg/minetest.conf \
|
--config /home/quentinbd/mff-hg/minetest.conf \
|
||||||
--gameid hungry_games \
|
--gameid Hungry Games \
|
||||||
--port 30042 \
|
--port 30042 \
|
||||||
# --logfile $DEBUG
|
# --logfile $DEBUG
|
||||||
|
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DEBUG='/home/quentinbd/script/debug-mff-magichet.txt'
|
||||||
|
MOREDEBUG='/home/quentinbd/script/moredebug-mff-megichet.txt'
|
||||||
|
|
||||||
|
cd /home/quentinbd/mff-hg
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
echo "----------------------" >>$MOREDEBUG
|
||||||
|
echo "Server restarted at "`date` >>$MOREDEBUG
|
||||||
|
echo "----------------------" >>$MOREDEBUG
|
||||||
|
|
||||||
|
echo "0" >/tmp/players_c.txt
|
||||||
|
|
||||||
|
/home/quentinbd/mff-magichet/bin/minetestserver \
|
||||||
|
--world /home/quentinbd/mff-magichet/worlds/minetestforfun-magichet/ \
|
||||||
|
--config /home/quentinbd/mff-magichet/minetest.conf \
|
||||||
|
--gameid Magichet \
|
||||||
|
--port 30091 \
|
||||||
|
# --logfile $DEBUG
|
||||||
|
|
||||||
|
sleep 25
|
||||||
|
done &>> $MOREDEBUG
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DEBUG='/home/quentinbd/script/debug-mff-skyblock.txt'
|
||||||
|
MOREDEBUG='/home/quentinbd/script/moredebug-mff-skyblock.txt'
|
||||||
|
|
||||||
|
cd /home/quentinbd/mff-skyblock
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
echo "----------------------" >>$MOREDEBUG
|
||||||
|
echo "Server restarted at "`date` >>$MOREDEBUG
|
||||||
|
echo "----------------------" >>$MOREDEBUG
|
||||||
|
|
||||||
|
echo "0" >/tmp/players_c.txt
|
||||||
|
|
||||||
|
/home/quentinbd/mff-skyblock/bin/minetestserver \
|
||||||
|
--world /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/ \
|
||||||
|
--config /home/quentinbd/mff-skyblock/minetest.conf \
|
||||||
|
--gameid Skyblock \
|
||||||
|
--port 30052 \
|
||||||
|
# --logfile $DEBUG
|
||||||
|
|
||||||
|
sleep 25
|
||||||
|
done &>> $MOREDEBUG
|
0
other_things/scripts/Server-side/script/start-mff.sh
Executable file → Normal file
0
other_things/scripts/Server-side/script/start-mff.sh
Executable file → Normal file
53
other_things/scripts/Server-side/upgrade-mff-hg/upgrade-part-mff-hg.sh
Executable file → Normal file
53
other_things/scripts/Server-side/upgrade-mff-hg/upgrade-part-mff-hg.sh
Executable file → Normal file
@ -1,57 +1,44 @@
|
|||||||
# on récupère la dernière version du jeu
|
# on récupère la dernière version du jeu
|
||||||
cd /home/quentinbd/
|
cd /home/quentinbd/
|
||||||
git clone https://github.com/MinetestForFun/server-minetestforfun-hungry_games.git
|
git clone https://github.com/MinetestForFun/server-minetestforfun-hungry_games.git
|
||||||
echo "Clone de minetest-minetestforfun-server réussit."
|
echo "Clone de server-minetestforfun-hungry_games réussit."
|
||||||
cd /home/quentinbd/server-minetestforfun-hungry_games/
|
cd /home/quentinbd/server-minetestforfun-hungry_games/
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
# on sauvegarde l'ancien subgame mff-hg
|
# On sauvegarde les anciens ../games et ../mods
|
||||||
rm -Rf /home/quentinbd/upgrade-mff-hg/olds-part/subgame/
|
rm -R /home/quentinbd/upgrade-mff-hg/olds-part/games/
|
||||||
echo "Ancienne sauvegarde du subgame correctement supprimée."
|
rm -R /home/quentinbd/upgrade-mff-hg/olds-part/mods/
|
||||||
|
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||||
|
|
||||||
cp -R /home/quentinbd/mff-hg/games /home/quentinbd/upgrade-mff-hg/olds-part/subgame/
|
cp -R /home/quentinbd/mff-hg/mods/ /home/quentinbd/upgrade-mff-hg/olds-part/
|
||||||
echo "Sauvegarde du subgame correctement effectuée."
|
cp -R /home/quentinbd/mff-hg/games/ /home/quentinbd/upgrade-mff-hg/olds-part/
|
||||||
|
echo "Sauvegarde de /mods et /games correctement effectuée."
|
||||||
|
|
||||||
# on MAJ le novueau subgame
|
# On MAJ les nouveaux minetest/games et minetest/mods
|
||||||
rm -Rf /home/quentinbd/mff-hg/games/
|
rm -R /home/quentinbd/mff-hg/games/
|
||||||
|
rm -R /home/quentinbd/mff-hg/mods/
|
||||||
mkdir /home/quentinbd/mff-hg/games/
|
mkdir /home/quentinbd/mff-hg/games/
|
||||||
cp -R /home/quentinbd/server-minetestforfun-hungry_games/ /home/quentinbd/mff-hg/games/
|
cp -R /home/quentinbd/server-minetestforfun-hungry_games/hungry_game/ /home/quentinbd/mff/games/
|
||||||
echo "Nouveau subgame correctement déplacé."
|
cp -R /home/quentinbd/server-minetestforfun-hungry_games/mods/ /home/quentinbd/mff/
|
||||||
|
echo "Nouveaux /mods et /games correctement déplacés"
|
||||||
|
|
||||||
# on MAJ le random_messages et le world.mt
|
# On MAJ le minetest.conf, world.mt, random_messages et le top_config.txt
|
||||||
#rm /home/quentinbd/mff/worlds/minetestforfun/news.txt
|
|
||||||
#rm /home/quentinbd/mff/worlds/minetestforfun/random_messages
|
|
||||||
mkdir /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
|
mkdir /home/quentinbd/mff-hg/worlds/minetestforfun-hg/
|
||||||
rm /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/random_messages
|
|
||||||
rm /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/world.mt
|
|
||||||
rm /home/quentinbd/mff-hg/minetest.conf
|
rm /home/quentinbd/mff-hg/minetest.conf
|
||||||
|
rm /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/world.mt
|
||||||
|
rm /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/random_messages
|
||||||
rm /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/top_config.txt
|
rm /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/top_config.txt
|
||||||
#cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun/news.txt /home/quentinbd/mff/worlds/minetestforfun/
|
# On les remet
|
||||||
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/random_messages /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/
|
|
||||||
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/world.mt /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/
|
|
||||||
cp /home/quentinbd/server-minetestforfun-hungry_games/minetest.conf /home/quentinbd/mff-hg/
|
cp /home/quentinbd/server-minetestforfun-hungry_games/minetest.conf /home/quentinbd/mff-hg/
|
||||||
|
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/world.mt /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/
|
||||||
|
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/random_messages /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/
|
||||||
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/top_config.txt /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/
|
cp /home/quentinbd/server-minetestforfun-hungry_games/worlds/minetestforfun-hg/top_config.txt /home/quentinbd/mff-hg/games/hungry_games/worlds/minetestforfun-hg/
|
||||||
|
|
||||||
echo "Nouveau 'random_messages/world.mt/minetest.conf/top_config.txt' correctement déplacé"
|
echo "Nouveau 'random_messages/world.mt/minetest.conf/top_config.txt' correctement déplacé"
|
||||||
|
|
||||||
# Suppression du dossier cloné
|
# Suppression du dossier cloné
|
||||||
rm -Rf /home/quentinbd/server-minetestforfun-hungry_games/
|
rm -Rf /home/quentinbd/server-minetestforfun-hungry_games/
|
||||||
echo "Bravo ! mff-hg/mods et mff-hg/games maintenant à jour"
|
echo "Bravo ! mff-hg/mods et mff-hg/games maintenant à jour"
|
||||||
|
|
||||||
# TEMPORAIRE - ré-ajout de l'ancien mod irc
|
|
||||||
#rm -R /home/quentinbd/mff-hg/games/hungry_games/mods/irc/
|
|
||||||
#rm -R /home/quentinbd/mff-hg/games/hungry_games/mods/irc_commands/
|
|
||||||
#echo "TEMPORAIRE - Suppression de l'irc car crash"
|
|
||||||
#cp -R /home/quentinbd/upgrade-mff/irc-old-save/ /home/quentinbd/mff-hg/games/hungry_games/mods/
|
|
||||||
#mv /home/quentinbd/mff-hg/games/hungry_games/mods/irc-old-save/ /home/quentinbd/mff-hg/games/hungry_games/mods/irc/
|
|
||||||
#echo "TEMPORAIRE - ré-ajout de l'ancien mod irc"
|
|
||||||
|
|
||||||
# TEMPORAIRE - ré-ajout de l'ancien mod throwing
|
|
||||||
#rm -R /home/quentinbd/minetest/mods/throwing/
|
|
||||||
#cp -R /home/quentinbd/upgrade/throwing-old-save/ /home/quentinbd/minetest/mods/
|
|
||||||
#mv /home/quentinbd/minetest/mods/throwing-old-save/ /home/quentinbd/minetest/mods/throwing/
|
|
||||||
#echo "TEMPORAIRE - ré-ajout de l'ancien mod throwing"
|
|
||||||
|
|
||||||
# On ré-attribut les droits à quentinbd et en 755
|
# On ré-attribut les droits à quentinbd et en 755
|
||||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-hg/
|
chown -R quentinbd:quentinbd /home/quentinbd/mff-hg/
|
||||||
chmod -R 755 /home/quentinbd/mff-hg/
|
chmod -R 755 /home/quentinbd/mff-hg/
|
||||||
|
38
other_things/scripts/Server-side/upgrade-mff-hg/w-upgrade-mff-hg.sh
Executable file → Normal file
38
other_things/scripts/Server-side/upgrade-mff-hg/w-upgrade-mff-hg.sh
Executable file → Normal file
@ -1,49 +1,43 @@
|
|||||||
# passer sur branche master ou stable github
|
# passer sur branche master ou stable github
|
||||||
cd /home/quentinbd/mff-hg/
|
cd /home/quentinbd/mff-hg/
|
||||||
#git checkout master
|
|
||||||
git checkout stable-0.4
|
|
||||||
|
|
||||||
# Suppression des anciens fichiers
|
# Suppression des anciens fichiers
|
||||||
#rm -Rv /home/quentinbd/upgrade-mff/olds
|
rm -Rv /home/quentinbd/upgrade-mff-hg/olds
|
||||||
#rm -Rv /home/quentinbd/upgrade-mff/mff.tar.gz
|
rm -Rv /home/quentinbd/upgrade-mff-hg/mff-hg.tar.gz
|
||||||
|
|
||||||
# Sauvegarde des fichiers critiques
|
# Sauvegarde des fichiers critiques
|
||||||
#cp -Rv /home/quentinbd/mff-hg/games/minetestforfun_game/ /home/quentinbd/upgrade-mff/olds/
|
cp -Rv /home/quentinbd/mff-hg/games/minetestforfun_game/ /home/quentinbd/upgrade-mff-hg/olds/
|
||||||
#cp -Rv /home/quentinbd/mff-hg/mods/ /home/quentinbd/upgrade-mff/olds/
|
cp -Rv /home/quentinbd/mff-hg/mods/ /home/quentinbd/upgrade-mff-hg/olds/
|
||||||
cp -Rv /home/quentinbd/mff-hg/worlds/ /home/quentinbd/upgrade-mff-hg/olds/
|
cp -Rv /home/quentinbd/mff-hg/worlds/ /home/quentinbd/upgrade-mff-hg/olds/
|
||||||
cp /home/quentinbd/mff-hg/minetest.conf /home/quentinbd/upgrade-mff-hg/olds/
|
cp /home/quentinbd/mff-hg/minetest.conf /home/quentinbd/upgrade-mff-hg/olds/
|
||||||
|
|
||||||
# Sauvegarde et compression du dossier minetest (au cas ou)
|
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||||
#cd /home/quentinbd/upgrade-mff/
|
cd /home/quentinbd/upgrade-mff-hg/
|
||||||
#tar -cf mff.tar.gz /home/quentinbd/mff-hg/
|
tar -cf mff-hg.tar.gz /home/quentinbd/mff-hg/
|
||||||
|
|
||||||
# Suppression de minetest
|
# Suppression de minetest
|
||||||
rm -Rv /home/quentinbd/mff-hg/
|
rm -Rv /home/quentinbd/mff-hg/
|
||||||
|
|
||||||
# Réinstallaton de minetest
|
# Réinstallaton de minetest
|
||||||
cd /home/quentinbd/
|
cd /home/quentinbd/
|
||||||
#git clone https://github.com/minetest/minetest.git
|
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||||
# DEBUT - Utilisation de la version 0.4 stable
|
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||||
git clone https://github.com/minetest/minetest.git
|
unzip /home/quentinbd/stable-0.4
|
||||||
mv /home/quentinbd/minetest/ /home/quentinbd/mff-hg/
|
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff-hg/
|
||||||
|
rm -v /home/quentinbd/stable-0.4
|
||||||
# FIN - Utilisation de la version 0.4 stable
|
# FIN - Utilisation de la version 0.4 stable
|
||||||
#cd /home/quentinbd/mff-hg/games/
|
|
||||||
#git clone https://github.com/minetest/minetest_game.git
|
|
||||||
|
|
||||||
# Compilation
|
# Compilation
|
||||||
cd /home/quentinbd/mff-hg/
|
cd /home/quentinbd/mff-hg/
|
||||||
# build sqlite3
|
# build SQLITE3
|
||||||
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||||
make -j$(grep -c processor /proc/cpuinfo)
|
make -j$(grep -c processor /proc/cpuinfo)
|
||||||
# build redis + irc
|
|
||||||
#cmake . -DENABLE_REDIS=1 -DRUN_RUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
|
||||||
#make -j$(grep -c processor /proc/cpuinfo)
|
|
||||||
|
|
||||||
# Ajout des fichiers critiques au nouveau dossier minetest
|
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||||
#cp -Rv /home/quentinbd/upgrade-mff/olds/minetestforfun_game/ /home/quentinbd/mff-hg/games/
|
cp -Rv /home/quentinbd/upgrade-mff-hg/olds/minetestforfun_game/ /home/quentinbd/mff-hg/games/
|
||||||
#cp -Rv /home/quentinbd/upgrade-mff/olds/mods/ /home/quentinbd/mff-hg/
|
cp -Rv /home/quentinbd/upgrade-mff-hg/olds/mods/ /home/quentinbd/mff-hg/
|
||||||
cp -Rv /home/quentinbd/upgrade-mff/olds/worlds/ /home/quentinbd/mff-hg/
|
cp -Rv /home/quentinbd/upgrade-mff-hg/olds/worlds/ /home/quentinbd/mff-hg/
|
||||||
cp /home/quentinbd/upgrade-mff/olds/minetest.conf /home/quentinbd/mff-hg/
|
cp /home/quentinbd/upgrade-mff-hg/olds/minetest.conf /home/quentinbd/mff-hg/
|
||||||
|
|
||||||
# Donne les droits à quentinbd
|
# Donne les droits à quentinbd
|
||||||
chmod -R 755 /home/quentinbd/mff-hg/
|
chmod -R 755 /home/quentinbd/mff-hg/
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
# on récupère la dernière version du jeu
|
||||||
|
cd /home/quentinbd/
|
||||||
|
git clone https://github.com/MinetestForFun/server-minetestforfun-magichet.git
|
||||||
|
echo "Clone de server-minetestforfun-magichet réussit."
|
||||||
|
cd /home/quentinbd/server-minetestforfun-magichet/
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
# On sauvegarde les anciens ../games et ../mods
|
||||||
|
rm -R /home/quentinbd/upgrade-mff-magichet/olds-part/games/
|
||||||
|
rm -R /home/quentinbd/upgrade-mff-magichet/olds-part/mods/
|
||||||
|
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||||
|
|
||||||
|
cp -R /home/quentinbd/mff-magichet/mods/ /home/quentinbd/upgrade-mff-magichet/olds-part/
|
||||||
|
cp -R /home/quentinbd/mff-magichet/games/ /home/quentinbd/upgrade-mff-magichet/olds-part/
|
||||||
|
echo "Sauvegarde de /mods et /games correctement effectuée."
|
||||||
|
|
||||||
|
# On MAJ les nouveaux minetest/games et minetest/mods
|
||||||
|
rm -R /home/quentinbd/mff-magichet/games/
|
||||||
|
rm -R /home/quentinbd/mff-magichet/mods/
|
||||||
|
mkdir /home/quentinbd/mff-magichet/games/
|
||||||
|
cp -R /home/quentinbd/server-minetestforfun-magichet/hungry_game/ /home/quentinbd/mff/games/
|
||||||
|
cp -R /home/quentinbd/server-minetestforfun-magichet/mods/ /home/quentinbd/mff/
|
||||||
|
echo "Nouveaux /mods et /games correctement déplacés"
|
||||||
|
|
||||||
|
# On MAJ le minetest.conf, world.mt, et le random_messages
|
||||||
|
mkdir /home/quentinbd/mff-magichet/worlds/minetestforfun-magichet/
|
||||||
|
rm /home/quentinbd/mff-magichet/minetest.conf
|
||||||
|
rm /home/quentinbd/mff-magichet/games/hungry_games/worlds/minetestforfun-magichet/world.mt
|
||||||
|
rm /home/quentinbd/mff-magichet/games/hungry_games/worlds/minetestforfun-magichet/random_messages
|
||||||
|
# On les remet
|
||||||
|
cp /home/quentinbd/server-minetestforfun-magichet/minetest.conf /home/quentinbd/mff-magichet/
|
||||||
|
cp /home/quentinbd/server-minetestforfun-magichet/worlds/minetestforfun-magichet/world.mt /home/quentinbd/mff-magichet/games/hungry_games/worlds/minetestforfun-magichet/
|
||||||
|
cp /home/quentinbd/server-minetestforfun-magichet/worlds/minetestforfun-magichet/random_messages /home/quentinbd/mff-magichet/games/hungry_games/worlds/minetestforfun-magichet/
|
||||||
|
echo "Nouveau 'random_messages/world.mt/minetest.conf/top_config.txt' correctement déplacé"
|
||||||
|
|
||||||
|
# Suppression du dossier cloné
|
||||||
|
rm -Rf /home/quentinbd/server-minetestforfun-magichet/
|
||||||
|
echo "Bravo ! mff-magichet/mods et mff-magichet/games maintenant à jour"
|
||||||
|
|
||||||
|
# On ré-attribut les droits à quentinbd et en 755
|
||||||
|
chown -R quentinbd:quentinbd /home/quentinbd/mff-magichet/
|
||||||
|
chmod -R 755 /home/quentinbd/mff-magichet/
|
||||||
|
echo "ré-attribution des droits à quentinbd:quentinbd"
|
@ -0,0 +1,44 @@
|
|||||||
|
# passer sur branche master ou stable github
|
||||||
|
cd /home/quentinbd/mff-magichet/
|
||||||
|
|
||||||
|
# Suppression des anciens fichiers
|
||||||
|
rm -Rv /home/quentinbd/upgrade-mff-magichet/olds
|
||||||
|
rm -Rv /home/quentinbd/upgrade-mff-magichet/mff-magichet.tar.gz
|
||||||
|
|
||||||
|
# Sauvegarde des fichiers critiques
|
||||||
|
cp -Rv /home/quentinbd/mff-magichet/games/minetestforfun_game/ /home/quentinbd/upgrade-mff-magichet/olds/
|
||||||
|
cp -Rv /home/quentinbd/mff-magichet/mods/ /home/quentinbd/upgrade-mff-magichet/olds/
|
||||||
|
cp -Rv /home/quentinbd/mff-magichet/worlds/ /home/quentinbd/upgrade-mff-magichet/olds/
|
||||||
|
cp /home/quentinbd/mff-magichet/minetest.conf /home/quentinbd/upgrade-mff-magichet/olds/
|
||||||
|
|
||||||
|
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||||
|
cd /home/quentinbd/upgrade-mff-magichet/
|
||||||
|
tar -cf mff-magichet.tar.gz /home/quentinbd/mff-magichet/
|
||||||
|
|
||||||
|
# Suppression de minetest
|
||||||
|
rm -Rv /home/quentinbd/mff-magichet/
|
||||||
|
|
||||||
|
# Réinstallaton de minetest
|
||||||
|
cd /home/quentinbd/
|
||||||
|
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||||
|
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||||
|
unzip /home/quentinbd/stable-0.4
|
||||||
|
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff-magichet/
|
||||||
|
rm -v /home/quentinbd/stable-0.4
|
||||||
|
# FIN - Utilisation de la version 0.4 stable
|
||||||
|
|
||||||
|
# Compilation
|
||||||
|
cd /home/quentinbd/mff-magichet/
|
||||||
|
# build SQLITE3
|
||||||
|
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||||
|
make -j$(grep -c processor /proc/cpuinfo)
|
||||||
|
|
||||||
|
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||||
|
cp -Rv /home/quentinbd/upgrade-mff-magichet/olds/minetestforfun_game/ /home/quentinbd/mff-magichet/games/
|
||||||
|
cp -Rv /home/quentinbd/upgrade-mff-magichet/olds/mods/ /home/quentinbd/mff-magichet/
|
||||||
|
cp -Rv /home/quentinbd/upgrade-mff-magichet/olds/worlds/ /home/quentinbd/mff-magichet/
|
||||||
|
cp /home/quentinbd/upgrade-mff-magichet/olds/minetest.conf /home/quentinbd/mff-magichet/
|
||||||
|
|
||||||
|
# Donne les droits à quentinbd
|
||||||
|
chmod -R 755 /home/quentinbd/mff-magichet/
|
||||||
|
chown -R quentinbd:quentinbd /home/quentinbd/mff-magichet/
|
@ -0,0 +1,43 @@
|
|||||||
|
# on récupère la dernière version du jeu
|
||||||
|
cd /home/quentinbd/
|
||||||
|
git clone https://github.com/MinetestForFun/server-minetestforfun-skyblock.git
|
||||||
|
echo "Clone de server-minetestforfun-skyblock réussit."
|
||||||
|
cd /home/quentinbd/server-minetestforfun-skyblock/
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
# On sauvegarde les anciens ../games et ../mods
|
||||||
|
rm -R /home/quentinbd/upgrade-mff-skyblock/olds-part/games/
|
||||||
|
rm -R /home/quentinbd/upgrade-mff-skyblock/olds-part/mods/
|
||||||
|
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||||
|
|
||||||
|
cp -R /home/quentinbd/mff-skyblock/mods/ /home/quentinbd/upgrade-mff-skyblock/olds-part/
|
||||||
|
cp -R /home/quentinbd/mff-skyblock/games/ /home/quentinbd/upgrade-mff-skyblock/olds-part/
|
||||||
|
echo "Sauvegarde de /mods et /games correctement effectuée."
|
||||||
|
|
||||||
|
# On MAJ les nouveaux minetest/games et minetest/mods
|
||||||
|
rm -R /home/quentinbd/mff-skyblock/games/
|
||||||
|
rm -R /home/quentinbd/mff-skyblock/mods/
|
||||||
|
mkdir /home/quentinbd/mff-skyblock/games/
|
||||||
|
cp -R /home/quentinbd/server-minetestforfun-skyblock/hungry_game/ /home/quentinbd/mff/games/
|
||||||
|
cp -R /home/quentinbd/server-minetestforfun-skyblock/mods/ /home/quentinbd/mff/
|
||||||
|
echo "Nouveaux /mods et /games correctement déplacés"
|
||||||
|
|
||||||
|
# On MAJ le minetest.conf, world.mt, et le random_messages
|
||||||
|
mkdir /home/quentinbd/mff-skyblock/worlds/minetestforfun-skyblock/
|
||||||
|
rm /home/quentinbd/mff-skyblock/minetest.conf
|
||||||
|
rm /home/quentinbd/mff-skyblock/games/hungry_games/worlds/minetestforfun-skyblock/world.mt
|
||||||
|
rm /home/quentinbd/mff-skyblock/games/hungry_games/worlds/minetestforfun-skyblock/random_messages
|
||||||
|
# On les remet
|
||||||
|
cp /home/quentinbd/server-minetestforfun-skyblock/minetest.conf /home/quentinbd/mff-skyblock/
|
||||||
|
cp /home/quentinbd/server-minetestforfun-skyblock/worlds/minetestforfun-skyblock/world.mt /home/quentinbd/mff-skyblock/games/hungry_games/worlds/minetestforfun-skyblock/
|
||||||
|
cp /home/quentinbd/server-minetestforfun-skyblock/worlds/minetestforfun-skyblock/random_messages /home/quentinbd/mff-skyblock/games/hungry_games/worlds/minetestforfun-skyblock/
|
||||||
|
echo "Nouveau 'random_messages/world.mt/minetest.conf/top_config.txt' correctement déplacé"
|
||||||
|
|
||||||
|
# Suppression du dossier cloné
|
||||||
|
rm -Rf /home/quentinbd/server-minetestforfun-skyblock/
|
||||||
|
echo "Bravo ! mff-skyblock/mods et mff-skyblock/games maintenant à jour"
|
||||||
|
|
||||||
|
# On ré-attribut les droits à quentinbd et en 755
|
||||||
|
chown -R quentinbd:quentinbd /home/quentinbd/mff-skyblock/
|
||||||
|
chmod -R 755 /home/quentinbd/mff-skyblock/
|
||||||
|
echo "ré-attribution des droits à quentinbd:quentinbd"
|
@ -0,0 +1,44 @@
|
|||||||
|
# passer sur branche master ou stable github
|
||||||
|
cd /home/quentinbd/mff-skyblock/
|
||||||
|
|
||||||
|
# Suppression des anciens fichiers
|
||||||
|
rm -Rv /home/quentinbd/upgrade-mff-skyblock/olds
|
||||||
|
rm -Rv /home/quentinbd/upgrade-mff-skyblock/mff-skyblock.tar.gz
|
||||||
|
|
||||||
|
# Sauvegarde des fichiers critiques
|
||||||
|
cp -Rv /home/quentinbd/mff-skyblock/games/minetestforfun_game/ /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||||
|
cp -Rv /home/quentinbd/mff-skyblock/mods/ /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||||
|
cp -Rv /home/quentinbd/mff-skyblock/worlds/ /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||||
|
cp /home/quentinbd/mff-skyblock/minetest.conf /home/quentinbd/upgrade-mff-skyblock/olds/
|
||||||
|
|
||||||
|
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||||
|
cd /home/quentinbd/upgrade-mff-skyblock/
|
||||||
|
tar -cf mff-skyblock.tar.gz /home/quentinbd/mff-skyblock/
|
||||||
|
|
||||||
|
# Suppression de minetest
|
||||||
|
rm -Rv /home/quentinbd/mff-skyblock/
|
||||||
|
|
||||||
|
# Réinstallaton de minetest
|
||||||
|
cd /home/quentinbd/
|
||||||
|
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||||
|
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||||
|
unzip /home/quentinbd/stable-0.4
|
||||||
|
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff-skyblock/
|
||||||
|
rm -v /home/quentinbd/stable-0.4
|
||||||
|
# FIN - Utilisation de la version 0.4 stable
|
||||||
|
|
||||||
|
# Compilation
|
||||||
|
cd /home/quentinbd/mff-skyblock/
|
||||||
|
# build SQLITE3
|
||||||
|
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||||
|
make -j$(grep -c processor /proc/cpuinfo)
|
||||||
|
|
||||||
|
# Ajout des fichiers critiques au nouveau dossier minetest
|
||||||
|
cp -Rv /home/quentinbd/upgrade-mff-skyblock/olds/minetestforfun_game/ /home/quentinbd/mff-skyblock/games/
|
||||||
|
cp -Rv /home/quentinbd/upgrade-mff-skyblock/olds/mods/ /home/quentinbd/mff-skyblock/
|
||||||
|
cp -Rv /home/quentinbd/upgrade-mff-skyblock/olds/worlds/ /home/quentinbd/mff-skyblock/
|
||||||
|
cp /home/quentinbd/upgrade-mff-skyblock/olds/minetest.conf /home/quentinbd/mff-skyblock/
|
||||||
|
|
||||||
|
# Donne les droits à quentinbd
|
||||||
|
chmod -R 755 /home/quentinbd/mff-skyblock/
|
||||||
|
chown -R quentinbd:quentinbd /home/quentinbd/mff-skyblock/
|
32
other_things/scripts/Server-side/upgrade-mff/upgrade-part-mff.sh
Executable file → Normal file
32
other_things/scripts/Server-side/upgrade-mff/upgrade-part-mff.sh
Executable file → Normal file
@ -1,11 +1,11 @@
|
|||||||
# on récupère la dernière version du jeu
|
# On récupère la dernière version du jeu
|
||||||
cd /home/quentinbd/
|
cd /home/quentinbd/
|
||||||
git clone https://github.com/MinetestForFun/server-minetestforfun.git
|
git clone https://github.com/MinetestForFun/server-minetestforfun.git
|
||||||
echo "Clone de server-minetestforfun réussit."
|
echo "Clone de server-minetestforfun réussit."
|
||||||
cd /home/quentinbd/server-minetestforfun/
|
cd /home/quentinbd/server-minetestforfun/
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
# on sauvegarde les anciens minetest/games et minetest/mods
|
# On sauvegarde les anciens ../games et ../mods
|
||||||
rm -R /home/quentinbd/upgrade-mff/olds-part/games/
|
rm -R /home/quentinbd/upgrade-mff/olds-part/games/
|
||||||
rm -R /home/quentinbd/upgrade-mff/olds-part/mods/
|
rm -R /home/quentinbd/upgrade-mff/olds-part/mods/
|
||||||
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||||
@ -14,7 +14,7 @@ cp -R /home/quentinbd/mff/mods/ /home/quentinbd/upgrade-mff/olds-part/
|
|||||||
cp -R /home/quentinbd/mff/games/ /home/quentinbd/upgrade-mff/olds-part/
|
cp -R /home/quentinbd/mff/games/ /home/quentinbd/upgrade-mff/olds-part/
|
||||||
echo "Sauvegarde de /mods et /games correctement effectuée."
|
echo "Sauvegarde de /mods et /games correctement effectuée."
|
||||||
|
|
||||||
# on MAJ les nouveaux minetest/games et minetest/mods
|
# On MAJ les nouveaux minetest/games et minetest/mods
|
||||||
rm -R /home/quentinbd/mff/games/
|
rm -R /home/quentinbd/mff/games/
|
||||||
rm -R /home/quentinbd/mff/mods/
|
rm -R /home/quentinbd/mff/mods/
|
||||||
mkdir /home/quentinbd/mff/games/
|
mkdir /home/quentinbd/mff/games/
|
||||||
@ -22,18 +22,22 @@ cp -R /home/quentinbd/server-minetestforfun/minetestforfun_game/ /home/quentinbd
|
|||||||
cp -R /home/quentinbd/server-minetestforfun/mods/ /home/quentinbd/mff/
|
cp -R /home/quentinbd/server-minetestforfun/mods/ /home/quentinbd/mff/
|
||||||
echo "Nouveaux /mods et /games correctement déplacés"
|
echo "Nouveaux /mods et /games correctement déplacés"
|
||||||
|
|
||||||
# on MAJ les news, random_messages et le world.mt
|
# On MAJ le minetest.conf, world.mt, random_messages et le news.txt
|
||||||
rm /home/quentinbd/mff/worlds/minetestforfun/news.txt
|
mkdir /home/quentinbd/mff/worlds/minetestforfun/
|
||||||
rm /home/quentinbd/mff/worlds/minetestforfun/random_messages
|
rm /home/quentinbd/mff-hg/minetest.conf
|
||||||
rm /home/quentinbd/mff/worlds/minetestforfun/world.mt
|
rm /home/quentinbd/mff/worlds/minetestforfun/world.mt
|
||||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/news.txt /home/quentinbd/mff/worlds/minetestforfun/
|
rm /home/quentinbd/mff/worlds/minetestforfun/random_messages
|
||||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/random_messages /home/quentinbd/mff/worlds/minetestforfun/
|
rm /home/quentinbd/mff/worlds/minetestforfun/news.txt
|
||||||
|
# On les remet
|
||||||
|
cp /home/quentinbd/server-minetestforfun/minetest.conf /home/quentinbd/mff/
|
||||||
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/world.mt /home/quentinbd/mff/worlds/minetestforfun/
|
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/world.mt /home/quentinbd/mff/worlds/minetestforfun/
|
||||||
|
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/random_messages /home/quentinbd/mff/worlds/minetestforfun/
|
||||||
|
cp /home/quentinbd/server-minetestforfun/worlds/minetestforfun/news.txt /home/quentinbd/mff/worlds/minetestforfun/
|
||||||
echo "Nouvelles news.txt, world.mt et random_messages correctement déplacé"
|
echo "Nouvelles news.txt, world.mt et random_messages correctement déplacé"
|
||||||
|
|
||||||
# Suppression du dossier cloné
|
# Suppression du dossier cloné
|
||||||
rm -Rf /home/quentinbd/server-minetestforfun/
|
rm -Rf /home/quentinbd/server-minetestforfun/
|
||||||
echo "Bravo ! minetest/mods et minetest/games maintenant à jour"
|
echo "Bravo ! mff/mods et mff/games maintenant à jour"
|
||||||
|
|
||||||
# TEMPORAIRE - ré-ajout de l'ancien mod irc
|
# TEMPORAIRE - ré-ajout de l'ancien mod irc
|
||||||
rm -R /home/quentinbd/mff/mods/irc/
|
rm -R /home/quentinbd/mff/mods/irc/
|
||||||
@ -41,13 +45,7 @@ cp -R /home/quentinbd/upgrade-mff/irc-old-save/ /home/quentinbd/mff/mods/
|
|||||||
mv /home/quentinbd/mff/mods/irc-old-save/ /home/quentinbd/mff/mods/irc/
|
mv /home/quentinbd/mff/mods/irc-old-save/ /home/quentinbd/mff/mods/irc/
|
||||||
echo "TEMPORAIRE - ré-ajout de l'ancien mod irc"
|
echo "TEMPORAIRE - ré-ajout de l'ancien mod irc"
|
||||||
|
|
||||||
# TEMPORAIRE - ré-ajout de l'ancien mod throwing
|
|
||||||
#rm -R /home/quentinbd/minetest/mods/throwing/
|
|
||||||
#cp -R /home/quentinbd/upgrade/throwing-old-save/ /home/quentinbd/minetest/mods/
|
|
||||||
#mv /home/quentinbd/minetest/mods/throwing-old-save/ /home/quentinbd/minetest/mods/throwing/
|
|
||||||
#echo "TEMPORAIRE - ré-ajout de l'ancien mod throwing"
|
|
||||||
|
|
||||||
# On ré-attribut les droits à quentinbd et en 755
|
# On ré-attribut les droits à quentinbd et en 755
|
||||||
chown -R quentinbd:quentinbd /home/quentinbd/
|
chown -R quentinbd:quentinbd /home/quentinbd/mff/
|
||||||
chmod -R 755 /home/quentinbd/
|
chmod -R 755 /home/quentinbd/mff/
|
||||||
echo "ré-attribution des droits à quentinbd:quentinbd"
|
echo "ré-attribution des droits à quentinbd:quentinbd"
|
||||||
|
22
other_things/scripts/Server-side/upgrade-mff/w-upgrade-mff.sh
Executable file → Normal file
22
other_things/scripts/Server-side/upgrade-mff/w-upgrade-mff.sh
Executable file → Normal file
@ -1,7 +1,5 @@
|
|||||||
# passer sur branche master ou stable github
|
# passer sur branche master ou stable github
|
||||||
cd /home/quentinbd/mff/
|
cd /home/quentinbd/mff/
|
||||||
#git checkout master
|
|
||||||
git checkout stable-0.4
|
|
||||||
|
|
||||||
# Suppression des anciens fichiers
|
# Suppression des anciens fichiers
|
||||||
rm -Rv /home/quentinbd/upgrade-mff/olds
|
rm -Rv /home/quentinbd/upgrade-mff/olds
|
||||||
@ -22,25 +20,16 @@ rm -Rv /home/quentinbd/mff/
|
|||||||
|
|
||||||
# Réinstallaton de minetest
|
# Réinstallaton de minetest
|
||||||
cd /home/quentinbd/
|
cd /home/quentinbd/
|
||||||
#git clone https://github.com/minetest/minetest.git
|
|
||||||
# DEBUT - Utilisation de la dernière version 0.4 stable
|
# DEBUT - Utilisation de la dernière version 0.4 stable
|
||||||
git clone https://github.com/minetest/minetest.git
|
wget https://codeload.github.com/minetest/minetest/zip/stable-0.4
|
||||||
#unzip /home/quentinbd/minetest-stable-0.4.zip
|
unzip /home/quentinbd/stable-0.4
|
||||||
#mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff/
|
mv /home/quentinbd/minetest-stable-0.4/ /home/quentinbd/mff/
|
||||||
mv /home/quentinbd/minetest/ /home/quentinbd/mff/
|
rm -v /home/quentinbd/stable-0.4
|
||||||
# FIN - Utilisation de la version 0.4 stable
|
# FIN - Utilisation de la version 0.4 stable
|
||||||
cd /home/quentinbd/mff/games/
|
|
||||||
git clone https://github.com/minetest/minetest_game.git
|
|
||||||
|
|
||||||
# Compilation
|
# Compilation
|
||||||
cd /home/quentinbd/mff/
|
cd /home/quentinbd/mff/
|
||||||
# build sqlite3
|
# Build REDIS + IRC
|
||||||
#cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1
|
|
||||||
#make -j$(grep -c processor /proc/cpuinfo)
|
|
||||||
# build redis
|
|
||||||
#cmake . -DENABLE_REDIS=1 -DRUN_RUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1
|
|
||||||
#make -j$(grep -c processor /proc/cpuinfo)
|
|
||||||
# build redis + irc
|
|
||||||
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DENABLE_REDIS=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_CURL=1
|
cmake . -DBUILD_CLIENT=0 -DBUILD_SERVER=1 -DENABLE_REDIS=1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LUAJIT=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_CURL=1
|
||||||
make -j$(grep -c processor /proc/cpuinfo)
|
make -j$(grep -c processor /proc/cpuinfo)
|
||||||
|
|
||||||
@ -51,4 +40,5 @@ cp -Rv /home/quentinbd/upgrade-mff/olds/worlds/ /home/quentinbd/mff/
|
|||||||
cp /home/quentinbd/upgrade-mff/olds/minetest.conf /home/quentinbd/mff/
|
cp /home/quentinbd/upgrade-mff/olds/minetest.conf /home/quentinbd/mff/
|
||||||
|
|
||||||
# Donne les droits à quentinbd
|
# Donne les droits à quentinbd
|
||||||
|
chmod -R 755 /home/quentinbd/mff/
|
||||||
chown -R quentinbd:quentinbd /home/quentinbd/
|
chown -R quentinbd:quentinbd /home/quentinbd/
|
||||||
|
Loading…
Reference in New Issue
Block a user