From 146e66513ebfaf44404b0c983cbbe7d00932eefb Mon Sep 17 00:00:00 2001 From: Quentin BUISSON-DEBON Date: Thu, 7 Jul 2016 16:37:51 +0200 Subject: [PATCH] New folder name for scripts script->scripts --- .../scripts/logs-servers-mff-rsync.sh | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/SRV-MINETEST/scripts/logs-servers-mff-rsync.sh b/SRV-MINETEST/scripts/logs-servers-mff-rsync.sh index 4e9ff29..a813b25 100644 --- a/SRV-MINETEST/scripts/logs-servers-mff-rsync.sh +++ b/SRV-MINETEST/scripts/logs-servers-mff-rsync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash #rsync -e "ssh -i /root/.ssh/id_dsa" -av --delete-after /home/quentinbd/minetest/worlds/minetestforfun/news.txt root@192.168.1.20:/var/www/wordpress/wp-content/uploads/news/ # Check the public key rights @@ -11,90 +11,90 @@ chmod 600 /home/quentinbd/.ssh/id_rsa.pub # MFF CLASSIC # ############### # On prend les 1000 dernières lignes des logs et on y met dans "notready-moredebug-mff.txt" -tail -n 1000 /home/quentinbd/script/moredebug-mff.txt > /home/quentinbd/script/notready-moredebug-mff.txt +tail -n 1000 /home/quentinbd/scripts/moredebug-mff.txt > /home/quentinbd/scripts/notready-moredebug-mff.txt # On ajoute une ligne au début -sed -i '1s/^/################################################\n/' /home/quentinbd/script/notready-moredebug-mff.txt -sed -i '1s/^/### MFF CLASSIC server - 1000 last log lines ###\n/' /home/quentinbd/script/notready-moredebug-mff.txt -sed -i '1s/^/################################################\n/' /home/quentinbd/script/notready-moredebug-mff.txt +sed -i '1s/^/################################################\n/' /home/quentinbd/scripts/notready-moredebug-mff.txt +sed -i '1s/^/### MFF CLASSIC server - 1000 last log lines ###\n/' /home/quentinbd/scripts/notready-moredebug-mff.txt +sed -i '1s/^/################################################\n/' /home/quentinbd/scripts/notready-moredebug-mff.txt # On cache les adresses IPs -sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/script/notready-moredebug-mff.txt > /home/quentinbd/script/1000-moredebug-mff.txt +sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/scripts/notready-moredebug-mff.txt > /home/quentinbd/scripts/1000-moredebug-mff.txt # On envoi "1000-moredebug-mff.txt" puis on le supprime -rsync -azrv --delete /home/quentinbd/script/1000-moredebug-mff.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ +rsync -azrv --delete /home/quentinbd/scripts/1000-moredebug-mff.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ echo ">>> Transfert réussi de 1000-moredebug-mff.txt sur le wordpress <<<" echo "" # On supprime le fichier temporaire -rm /home/quentinbd/script/notready-moredebug-mff.txt -rm /home/quentinbd/script/1000-moredebug-mff.txt +rm /home/quentinbd/scripts/notready-moredebug-mff.txt +rm /home/quentinbd/scripts/1000-moredebug-mff.txt ########## # MFF HG # ########## # On prend les 1000 dernières lignes des logs et on y met dans "notready-moredebug-mff-hg.txt" -tail -n 1000 /home/quentinbd/script/moredebug-mff-hg.txt > /home/quentinbd/script/notready-moredebug-mff-hg.txt +tail -n 1000 /home/quentinbd/scripts/moredebug-mff-hg.txt > /home/quentinbd/scripts/notready-moredebug-mff-hg.txt # On ajoute une ligne au début -sed -i '1s/^/###########################################\n/' /home/quentinbd/script/notready-moredebug-mff-hg.txt -sed -i '1s/^/### MFF HG server - 1000 last log lines ###\n/' /home/quentinbd/script/notready-moredebug-mff-hg.txt -sed -i '1s/^/###########################################\n/' /home/quentinbd/script/notready-moredebug-mff-hg.txt +sed -i '1s/^/###########################################\n/' /home/quentinbd/scripts/notready-moredebug-mff-hg.txt +sed -i '1s/^/### MFF HG server - 1000 last log lines ###\n/' /home/quentinbd/scripts/notready-moredebug-mff-hg.txt +sed -i '1s/^/###########################################\n/' /home/quentinbd/scripts/notready-moredebug-mff-hg.txt # On cache les adresses IPs -sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/script/notready-moredebug-mff-hg.txt > /home/quentinbd/script/1000-moredebug-mff-hg.txt +sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/scripts/notready-moredebug-mff-hg.txt > /home/quentinbd/scripts/1000-moredebug-mff-hg.txt # On envoi "1000-moredebug-mff-hg.txt" puis on le supprime -rsync -azrv --delete /home/quentinbd/script/1000-moredebug-mff-hg.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ +rsync -azrv --delete /home/quentinbd/scripts/1000-moredebug-mff-hg.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ echo ">>> Transfert réussi de 1000-moredebug-mff-hg.txt sur le wordpress <<<" echo "" # On supprime le fichier temporaire -rm /home/quentinbd/script/notready-moredebug-mff-hg.txt -rm /home/quentinbd/script/1000-moredebug-mff-hg.txt +rm /home/quentinbd/scripts/notready-moredebug-mff-hg.txt +rm /home/quentinbd/scripts/1000-moredebug-mff-hg.txt ################ # MFF SKYBLOCK # ################ # On prend les 1000 dernières lignes des logs et on y met dans "notready-moredebug-mff-skyblock.txt" -tail -n 1000 /home/quentinbd/script/moredebug-mff-skyblock.txt > /home/quentinbd/script/notready-moredebug-mff-skyblock.txt +tail -n 1000 /home/quentinbd/scripts/moredebug-mff-skyblock.txt > /home/quentinbd/scripts/notready-moredebug-mff-skyblock.txt # On ajoute une ligne au début -sed -i '1s/^/#################################################\n/' /home/quentinbd/script/notready-moredebug-mff-skyblock.txt -sed -i '1s/^/### MFF SKYBLOCK server - 1000 last log lines ###\n/' /home/quentinbd/script/notready-moredebug-mff-skyblock.txt -sed -i '1s/^/#################################################\n/' /home/quentinbd/script/notready-moredebug-mff-skyblock.txt +sed -i '1s/^/#################################################\n/' /home/quentinbd/scripts/notready-moredebug-mff-skyblock.txt +sed -i '1s/^/### MFF SKYBLOCK server - 1000 last log lines ###\n/' /home/quentinbd/scripts/notready-moredebug-mff-skyblock.txt +sed -i '1s/^/#################################################\n/' /home/quentinbd/scripts/notready-moredebug-mff-skyblock.txt # On cache les adresses IPs -sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/script/notready-moredebug-mff-skyblock.txt > /home/quentinbd/script/1000-moredebug-mff-skyblock.txt +sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/scripts/notready-moredebug-mff-skyblock.txt > /home/quentinbd/scripts/1000-moredebug-mff-skyblock.txt # On envoi "1000-moredebug-mff-skyblock.txt" puis on le supprime -rsync -azrv --delete /home/quentinbd/script/1000-moredebug-mff-skyblock.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ +rsync -azrv --delete /home/quentinbd/scripts/1000-moredebug-mff-skyblock.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ echo ">>> Transfert réussi de 1000-moredebug-mff-skyblock.txt sur le wordpress <<<" echo "" # On supprime le fichier temporaire -rm /home/quentinbd/script/notready-moredebug-mff-skyblock.txt -rm /home/quentinbd/script/1000-moredebug-mff-skyblock.txt +rm /home/quentinbd/scripts/notready-moredebug-mff-skyblock.txt +rm /home/quentinbd/scripts/1000-moredebug-mff-skyblock.txt ################ # MFF CREATIVE # ################ # On prend les 1000 dernières lignes des logs et on y met dans "notready-moredebug-mff-creative.txt" -tail -n 1000 /home/quentinbd/script/moredebug-mff-creative.txt > /home/quentinbd/script/notready-moredebug-mff-creative.txt +tail -n 1000 /home/quentinbd/scripts/moredebug-mff-creative.txt > /home/quentinbd/scripts/notready-moredebug-mff-creative.txt # On ajoute une ligne au début -sed -i '1s/^/#################################################\n/' /home/quentinbd/script/notready-moredebug-mff-creative.txt -sed -i '1s/^/### MFF CREATIVE server - 1000 last log lines ###\n/' /home/quentinbd/script/notready-moredebug-mff-creative.txt -sed -i '1s/^/#################################################\n/' /home/quentinbd/script/notready-moredebug-mff-creative.txt +sed -i '1s/^/#################################################\n/' /home/quentinbd/scripts/notready-moredebug-mff-creative.txt +sed -i '1s/^/### MFF CREATIVE server - 1000 last log lines ###\n/' /home/quentinbd/scripts/notready-moredebug-mff-creative.txt +sed -i '1s/^/#################################################\n/' /home/quentinbd/scripts/notready-moredebug-mff-creative.txt # On cache les adresses IPs -sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/script/notready-moredebug-mff-creative.txt > /home/quentinbd/script/1000-moredebug-mff-creative.txt +sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9]*/???.???.???.???/g' /home/quentinbd/scripts/notready-moredebug-mff-creative.txt > /home/quentinbd/scripts/1000-moredebug-mff-creative.txt # On envoi "1000-moredebug-mff-creative.txt" puis on le supprime -rsync -azrv --delete /home/quentinbd/script/1000-moredebug-mff-creative.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ +rsync -azrv --delete /home/quentinbd/scripts/1000-moredebug-mff-creative.txt quentinbd@192.168.1.20:/var/www/wordpress/wp-content/uploads/logs/ echo ">>> Transfert réussi de 1000-moredebug-mff-creative.txt sur le wordpress <<<" echo "" # On supprime le fichier temporaire -rm /home/quentinbd/script/notready-moredebug-mff-creative.txt -rm /home/quentinbd/script/1000-moredebug-mff-creative.txt +rm /home/quentinbd/scripts/notready-moredebug-mff-creative.txt +rm /home/quentinbd/scripts/1000-moredebug-mff-creative.txt