mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-23 16:30:19 +01:00
Adapt scripts for the creative server
This commit is contained in:
parent
4343577013
commit
dda2da1b43
@ -0,0 +1,47 @@
|
||||
# on récupère la dernière version du jeu
|
||||
cd /home/quentinbd/
|
||||
git clone https://github.com/MinetestForFun/server-minetestforfun-creative.git
|
||||
echo "Clone de server-minetestforfun-creative réussit."
|
||||
cd /home/quentinbd/server-minetestforfun-creative/
|
||||
git submodule update --init --recursive
|
||||
|
||||
# On sauvegarde les anciens ../games et ../mods
|
||||
rm -R /home/quentinbd/upgrade-mff-creative/olds-part/games/
|
||||
rm -R /home/quentinbd/upgrade-mff-creative/olds-part/mods/
|
||||
echo "Ancienne sauvegarde de /mods et /games correctement supprimée."
|
||||
|
||||
cp -R /home/quentinbd/mff-creative/mods/ /home/quentinbd/upgrade-mff-creative/olds-part/
|
||||
cp -R /home/quentinbd/mff-creative/games/ /home/quentinbd/upgrade-mff-creative/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-creative/mods/
|
||||
rm -R /home/quentinbd/mff-creative/games/
|
||||
mkdir /home/quentinbd/mff-creative/games/
|
||||
mkdir /home/quentinbd/server-minetestforfun-creative/games
|
||||
mkdir /home/quentinbd/mff-creative/games/minetestforfun_creative/
|
||||
mkdir /home/quentinbd/mff-creative/games/minetestforfun_creative/mods/
|
||||
cp -R /home/quentinbd/server-minetestforfun-creative/mods/ /home/quentinbd/mff-creative/games/minetestforfun_creative/
|
||||
echo "Nouveaux /mods et /games correctement déplacés"
|
||||
|
||||
# On MAJ le minetest.conf, game.conf, world.mt, et le random_messages
|
||||
mkdir /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
|
||||
rm /home/quentinbd/mff-creative/minetest.conf
|
||||
rm /home/quentinbd/mff-creative/worlds/minetestforfun-creative/world.mt
|
||||
rm /home/quentinbd/mff-creative/worlds/minetestforfun-creative/random_messages
|
||||
# On les remet
|
||||
cp /home/quentinbd/server-minetestforfun-creative/minetest.conf /home/quentinbd/mff-creative/games/minetestforfun_creative/
|
||||
cp /home/quentinbd/server-minetestforfun-creative/minetest.conf /home/quentinbd/mff-creative/
|
||||
cp /home/quentinbd/server-minetestforfun-creative/game.conf /home/quentinbd/mff-creative/games/minetestforfun_creative/
|
||||
#cp /home/quentinbd/server-minetestforfun-creative/worlds/minetestforfun-creative/world.mt /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
|
||||
cp /home/quentinbd/server-minetestforfun-creative/worlds/minetestforfun-creative/random_messages /home/quentinbd/mff-creative/worlds/minetestforfun-creative/
|
||||
echo "Nouveau 'minetest.conf, game.conf, world.mt, et le random_messages' correctement déplacé"
|
||||
|
||||
# Suppression du dossier cloné
|
||||
rm -Rf /home/quentinbd/server-minetestforfun-creative/
|
||||
echo "Bravo ! mff-creative/mods et mff-creative/games maintenant à jour"
|
||||
|
||||
# On ré-attribut les droits à quentinbd et en 755
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-creative/
|
||||
chmod -R 755 /home/quentinbd/mff-creative/
|
||||
echo "ré-attribution des droits à quentinbd:quentinbd"
|
@ -0,0 +1,44 @@
|
||||
# passer sur branche master ou stable github
|
||||
cd /home/quentinbd/mff-creative/
|
||||
|
||||
# Suppression des anciens fichiers
|
||||
rm -Rv /home/quentinbd/upgrade-mff-creative/olds
|
||||
rm -Rv /home/quentinbd/upgrade-mff-creative/mff-creative.tar.gz
|
||||
|
||||
# Sauvegarde des fichiers critiques
|
||||
cp -Rv /home/quentinbd/mff-creative/games/minetestforfun_creative/ /home/quentinbd/upgrade-mff-creative/olds/
|
||||
cp -Rv /home/quentinbd/mff-creative/mods/ /home/quentinbd/upgrade-mff-creative/olds/
|
||||
cp -Rv /home/quentinbd/mff-creative/worlds/ /home/quentinbd/upgrade-mff-creative/olds/
|
||||
cp /home/quentinbd/mff-creative/minetest.conf /home/quentinbd/upgrade-mff-creative/olds/
|
||||
|
||||
# Sauvegarde et compression du dossier minetest (au cas ou)
|
||||
cd /home/quentinbd/upgrade-mff-creative/
|
||||
tar -cf mff-creative.tar.gz /home/quentinbd/mff-creative/
|
||||
|
||||
# Suppression de minetest
|
||||
rm -Rv /home/quentinbd/mff-creative/
|
||||
|
||||
# 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-creative/
|
||||
rm -v /home/quentinbd/stable-0.4
|
||||
# FIN - Utilisation de la version 0.4 stable
|
||||
|
||||
# Compilation
|
||||
cd /home/quentinbd/mff-creative/
|
||||
# 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-creative/olds/minetestforfun_creative/ /home/quentinbd/mff-creative/games/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-creative/olds/mods/ /home/quentinbd/mff-creative/
|
||||
cp -Rv /home/quentinbd/upgrade-mff-creative/olds/worlds/ /home/quentinbd/mff-creative/
|
||||
cp /home/quentinbd/upgrade-mff-creative/olds/minetest.conf /home/quentinbd/mff-creative/
|
||||
|
||||
# Donne les droits à quentinbd
|
||||
chmod -R 755 /home/quentinbd/mff-creative/
|
||||
chown -R quentinbd:quentinbd /home/quentinbd/mff-creative/
|
@ -1,47 +0,0 @@
|
||||
# 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/mods/
|
||||
rm -R /home/quentinbd/mff-magichet/games/
|
||||
mkdir /home/quentinbd/mff-magichet/games/
|
||||
mkdir /home/quentinbd/server-minetestforfun-magichet/games
|
||||
mkdir /home/quentinbd/mff-magichet/games/minetestforfun_magichet/
|
||||
mkdir /home/quentinbd/mff-magichet/games/minetestforfun_magichet/mods/
|
||||
cp -R /home/quentinbd/server-minetestforfun-magichet/mods/ /home/quentinbd/mff-magichet/games/minetestforfun_magichet/
|
||||
echo "Nouveaux /mods et /games correctement déplacés"
|
||||
|
||||
# On MAJ le minetest.conf, game.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/worlds/minetestforfun-magichet/world.mt
|
||||
rm /home/quentinbd/mff-magichet/worlds/minetestforfun-magichet/random_messages
|
||||
# On les remet
|
||||
cp /home/quentinbd/server-minetestforfun-magichet/minetest.conf /home/quentinbd/mff-magichet/games/minetestforfun_magichet/
|
||||
cp /home/quentinbd/server-minetestforfun-magichet/minetest.conf /home/quentinbd/mff-magichet/
|
||||
cp /home/quentinbd/server-minetestforfun-magichet/game.conf /home/quentinbd/mff-magichet/games/minetestforfun_magichet/
|
||||
#cp /home/quentinbd/server-minetestforfun-magichet/worlds/minetestforfun-magichet/world.mt /home/quentinbd/mff-magichet/worlds/minetestforfun-magichet/
|
||||
cp /home/quentinbd/server-minetestforfun-magichet/worlds/minetestforfun-magichet/random_messages /home/quentinbd/mff-magichet/worlds/minetestforfun-magichet/
|
||||
echo "Nouveau 'minetest.conf, game.conf, world.mt, et le random_messages' 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"
|
@ -1,44 +0,0 @@
|
||||
# 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_magichet/ /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_magichet/ /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/
|
Loading…
Reference in New Issue
Block a user