{"version":"1.1","schema_version":"1.1.0","plugin_version":"1.1.2","url":"https://tutos-gameserver.fr/2019/10/29/ram-a-allouer-au-serveur-export-max_ram-8g-nom-du-fichier-pour-forge-ja-resoudre-les-problemes-dun-serveur-minecraft/","llm_html_url":"https://tutos-gameserver.fr/2019/10/29/ram-a-allouer-au-serveur-export-max_ram-8g-nom-du-fichier-pour-forge-ja-resoudre-les-problemes-dun-serveur-minecraft/llm","llm_json_url":"https://tutos-gameserver.fr/2019/10/29/ram-a-allouer-au-serveur-export-max_ram-8g-nom-du-fichier-pour-forge-ja-resoudre-les-problemes-dun-serveur-minecraft/llm.json","manifest_url":"https://tutos-gameserver.fr/llm-endpoints-manifest.json","language":"fr-FR","locale":"fr_FR","title":"# RAM à allouer au serveur export MAX_RAM = &quot;8G&quot; # Nom du fichier pour forge ja\n\n &#8211; Resoudre les problemes d&rsquo;un serveur MineCraft","site":{"name":"Tutos GameServer","url":"https://tutos-gameserver.fr/"},"author":{"id":1,"name":"Titanfall","url":"https://tutos-gameserver.fr/author/titanfall/"},"published_at":"2019-10-29T01:37:03+00:00","modified_at":"2019-10-29T01:37:03+00:00","word_count":1816,"reading_time_seconds":545,"summary":"# RAM à allouer au serveur export MAX_RAM = &quot;8G&quot; # Nom du fichier pour le fichier forge (requis par certains hôtes) export FORGE_JAR = &quot;forge.jar&quot; Arguments de démarrage de la machine virtuelle Java du serveur export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE [&hellip;]","summary_points":["# RAM à allouer au serveur\n\n\n        export MAX_RAM = &quot;8G&quot;\n\n\n\n\n        # Nom du fichier pour le fichier forge (requis par certains hôtes)\n\n\n        export FORGE_JAR = &quot;forge.jar&quot;\n\n\n\n\n        Arguments de démarrage de la machine virtuelle Java du serveur\n\n\n        export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE = 3&quot;\n\n\n\n\n        # Le serveur Max se bloque (à une heure d&#39;intervalle ou moins) pour arrêter le redémarrage automatique (10 par défaut)\n\n\n        export CRASH_COUNT = 10\n\n\n\n\n        # Autoriser le script à s&#39;exécuter dans TMP ou dans des répertoires sans accès en lecture / écriture (0 par défaut)\n\n\n        export RUN_FROM_BAD_FOLDER = 0\n\n\n\n\n        # Ignorer la connectivité Internet [ping] check (0 par défaut)\n\n\n        export IGNORE_OFFLINE = 0\n\n\n\n\n# Pour les développeurs Modpack\n\n\n# (Ne modifiez pas sauf si vous savez ce que vous faites)\n\n\n\n\n        export MCVER = &quot;1.10.2&quot;\n\n\n        export FORGEVER = &quot;12.18.3.2254&quot;\n\n\n        export FORGEURL = &quot;DISABLE&quot;\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n# Trucs de script internes à partir de maintenant\n\n\n# Aucune ligne destinée à être modifiée après ici\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n# Assurez-vous que les utilisateurs n&#39;essaient pas d&#39;exécuter le script via sh directement (cela ne fonctionnera pas)\n\n\nsi [ !","« $BASH_VERSION » ] ; ensuite\n\n\n        echo &quot;Merci de ne pas utiliser sh pour exécuter ce script ($ 0).","Utilisez bash à la place (ou exécutez-le directement)&quot; 1&gt; &amp; 2\n\n\n        sortie 1\n\n\nFi\n\n\n\n\n# routine pour gérer l&#39;installation de Forge / serveur\n\n\ninstall_server () {\n\n\n        echo &quot;Démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot;\n\n\n        echo &quot;DEBUG: démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n        si [ -f installer.jar ]; ensuite\n\n\n                echo &quot;DEBUG: installer.jar trouvé dans le répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                exportation réponse = &quot;n&quot;\n\n\n                read -t 8 -p &quot;Le programme d&#39;installation a été trouvé.","Utilisez-le (y) ou téléchargez-vous à nouveau (n)?&quot;\n\n\n                si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite\n\n\n                        echo &quot;INFO: Téléchargement en cours."],"topics":["Serveur minecraft"],"entities":[],"entities_metadata":[{"id":13,"name":"Serveur minecraft","slug":"serveur-minecraft","taxonomy":"category","count":2786,"url":"https://tutos-gameserver.fr/category/serveur-minecraft/"}],"tags":["Serveur minecraft"],"content_hash":"cb2378f7d9adb871529b812aa88d05b5","plain_text":"# RAM à allouer au serveur\n\n\n        export MAX_RAM = &quot;8G&quot;\n\n\n\n\n        # Nom du fichier pour le fichier forge (requis par certains hôtes)\n\n\n        export FORGE_JAR = &quot;forge.jar&quot;\n\n\n\n\n        Arguments de démarrage de la machine virtuelle Java du serveur\n\n\n        export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE = 3&quot;\n\n\n\n\n        # Le serveur Max se bloque (à une heure d&#39;intervalle ou moins) pour arrêter le redémarrage automatique (10 par défaut)\n\n\n        export CRASH_COUNT = 10\n\n\n\n\n        # Autoriser le script à s&#39;exécuter dans TMP ou dans des répertoires sans accès en lecture / écriture (0 par défaut)\n\n\n        export RUN_FROM_BAD_FOLDER = 0\n\n\n\n\n        # Ignorer la connectivité Internet [ping] check (0 par défaut)\n\n\n        export IGNORE_OFFLINE = 0\n\n\n\n\n# Pour les développeurs Modpack\n\n\n# (Ne modifiez pas sauf si vous savez ce que vous faites)\n\n\n\n\n        export MCVER = &quot;1.10.2&quot;\n\n\n        export FORGEVER = &quot;12.18.3.2254&quot;\n\n\n        export FORGEURL = &quot;DISABLE&quot;\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n# Trucs de script internes à partir de maintenant\n\n\n# Aucune ligne destinée à être modifiée après ici\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n#\n\n\n# Assurez-vous que les utilisateurs n&#39;essaient pas d&#39;exécuter le script via sh directement (cela ne fonctionnera pas)\n\n\nsi [ ! « $BASH_VERSION » ] ; ensuite\n\n\n        echo &quot;Merci de ne pas utiliser sh pour exécuter ce script ($ 0). Utilisez bash à la place (ou exécutez-le directement)&quot; 1&gt; &amp; 2\n\n\n        sortie 1\n\n\nFi\n\n\n\n\n# routine pour gérer l&#39;installation de Forge / serveur\n\n\ninstall_server () {\n\n\n        echo &quot;Démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot;\n\n\n        echo &quot;DEBUG: démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n        si [ -f installer.jar ]; ensuite\n\n\n                echo &quot;DEBUG: installer.jar trouvé dans le répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                exportation réponse = &quot;n&quot;\n\n\n                read -t 8 -p &quot;Le programme d&#39;installation a été trouvé. Utilisez-le (y) ou téléchargez-vous à nouveau (n)?&quot;\n\n\n                si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite\n\n\n                        echo &quot;INFO: Téléchargement en cours. Utilisation d&#39;un fichier d&#39;install.jar existant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Saut de téléchargement. Utilisation du fichier install.jar existant&quot;\n\n\n                Fi\n\n\n        autre\n\n\n                si [ « $FORGEURL » = « DISABLE » ]; ensuite\n\n\n                        export URL = &quot;http://files.minecraftforge.net/maven/net/minecraftforge/forge/$VERVER&#8211;$FORGEVERBuch/forge-$$CAUVER_forgeVER-&quot;.\n\n\n                autre\n\n\n                        export URL = &quot;$ FORGEURL&quot;\n\n\n                Fi\n\n\n\n\n                quel wget &gt;&gt; / dev / null\n\n\n                si [ $? -eq 0 ]; ensuite\n\n\n                        echo &quot;DEBUG: (wget) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        wget -O installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                autre\n\n\n                        qui curl &gt;&gt; / dev / null\n\n\n                        si [ $? -eq 0 ]; ensuite\n\n\n                                echo &quot;DEBUG: (curl) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                                curl -o installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        autre\n\n\n                                echo &quot;Ni wget ni curl n&#39;ont été trouvés sur votre système. Veuillez en installer un et réessayer&quot;\n\n\n                                echo &quot;ERREUR: ni wget ni curl n&#39;ont été trouvés&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        Fi\n\n\n                Fi\n\n\n        Fi\n\n\n\n\n        si [ ! -f installer.jar ]; ensuite\n\n\n                echo &quot;Le programme d&#39;installation de Forge n&#39;a pas été téléchargé&quot;\n\n\n                echo &quot;ERREUR: le programme d&#39;installation de Forge n&#39;a pas téléchargé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                sortie 0\n\n\n        autre\n\n\n                echo &quot;Déplacement de fichiers / dossiers inutiles vers ./DELETEME&quot;\n\n\n                echo &quot;INFO: Déplacement des fichiers / dossiers inutiles vers ./DELETEME&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                rm -rf ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv -f ./asm ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv -f ./libraries ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv -f ./llibrary ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv -f ./minecraft_server*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv -f ./forge*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv -f ./OpenComputersMod*lua* ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Installation du serveur Forge, veuillez patienter &#8230;&quot;\n\n\n                echo &quot;INFO: Installation du serveur Forge&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                java -jar installer.jar &#8211;installServer &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Suppression du programme d&#39;installation de Forge (n&#39;est plus nécessaire)&quot;\n\n\n                echo &quot;INFO: Suppression du fichier installer.jar&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                rm -rf installer.jar &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Renommer le fichier JAR de forge en $ FORGE_JAR&quot;\n\n\n                echo &quot;DEBUG: renommer forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar en $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                mv &quot;forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar&quot; $ FORGE_JAR &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n        Fi\n\n\n\n\n\n\n# routine à [re]démarrer le serveur minecraft Forgemodded\n\n\nstart_server () \n\n\n        écho &quot;&quot;\n\n\n        écho &quot;&quot;\n\n\n        echo &quot;Serveur de démarrage&quot;\n\n\n        echo &quot;INFO: Serveur de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S) &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n        java -Xmx $ MAX_RAM $ JAVA_ARGS -jar $ FORGE_JAR nogui\n\n\n\n\n\n\n# routine pour les vérifications de répertoire de base\n\n\ncheck_dir ()  [ « $(pwd) » = « /var/tmp » ]; ensuite\n\n\n                echo &quot;Le répertoire actuel semble être TMP&quot;\n\n\n                echo &quot;WARN: le répertoire DIR actuel est TEMP&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                si [ $RUN_FROM_BAD_FOLDER -eq 0 ]; ensuite\n\n\n                        echo &quot;ERREUR: arrêt dû à un dossier défectueux (TMP)&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Le paramètre RUN_FROM_BAD_FOLDER est désactivé, script de sortie&quot;\n\n\n                        sortie 0\n\n\n                autre\n\n\n                        echo &quot;WARN: Mauvais dossier (TMP) mais continue malgré tout&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Contournement de cd = arrêt temporaire selon les paramètres du script&quot;\n\n\n                Fi\n\n\n        Fi\n\n\n\n\n        si [ ! -r . ] \n\n\n\n\n# routine pour la connectivité ping inet\n\n\ncheck_connection () \n\n\n        si [ $IGNORE_OFFLINE -eq 1 ]; ensuite\n\n\n                echo &quot;WARN: la vérification de la connectivité Internet est désactivée&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Sauter la vérification de la connectivité Internet&quot;\n\n\n        autre\n\n\n                si ping -c 1 8.8.8.8 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite\n\n\n                        echo &quot;INFO: Ping to Google DNS réussi&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Ping to Google DNS réussie&quot;\n\n\n                autre\n\n\n                        echo &quot;ERREUR: échec de la commande ping vers Google DNS. Pas d&#39;accès à Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Echec de la commande ping vers Google DNS. Pas d&#39;accès Internet?&quot;\n\n\n                Fi\n\n\n\n\n                si ping -c 1 4.2.2.1 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite\n\n\n                        echo &quot;INFO: Ping to L4 successfull&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Ping to L4 successfull&quot;\n\n\n                autre\n\n\n                        echo &quot;ERREUR: Echec de la requête Ping to L4. Pas d&#39;accès Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                        echo &quot;Ping to L4 a échoué. Pas d&#39;accès à Internet?&quot;\n\n\n                        sortie 0\n\n\n                Fi\n\n\n        Fi\n\n\n\n\n\n\n# routine pour s&#39;assurer que les fichiers binaires nécessaires sont trouvés\n\n\ncheck_binaries () \n\n\n        si [ ! -f $FORGE_JAR ] ; ensuite\n\n\n                echo &quot;WARN: $ FORGE_JAR introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;\n\n\n                install_server\n\n\n        Fi\n\n\n        si [ ! -f ./minecraft_server.$MCVER.jar ] ; ensuite\n\n\n                echo &quot;WARN: minecraft_server. $ MCVER .jar non trouvé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;\n\n\n                install_server\n\n\n        Fi\n\n\n        si [ ! -d ./libraries ] ; ensuite\n\n\n                echo &quot;WARN: répertoire de la bibliothèque introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;\n\n\n                install_server\n\n\n        Fi\n\n\n\n\n\n\n# Le script / le lot commence ici &#8230;\n\n\n\n\n# fichier journal init et informations de base de vidage\n\n\necho &quot;INFO: le script de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S)&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: Dumping des variables de départ:&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: MAX_RAM = $ MAX_RAM&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: FORGE_JAR = $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: JAVA_ARGS = $ JAVA_ARGS&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: CRASH_COUNT = $ CRASH_COUNT&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: RUN_FROM_BAD_FOLDER = $ RUN_FROM_BAD_FOLDER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: IGNORE_OFFLINE = $ IGNORE_OFFLINE&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: MCVER = $ MCVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: FORGEVER = $ FORGEVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: FORGEURL = $ FORGEURL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: Informations système de base:&quot; $ (uname -a) &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: Estimation de la RAM totale:&quot; $ (getconf -a | grep PAGES | awk &#39;BEGIN total = 1 if (NR == 1  FIN print total / 1024/1024 &quot;MB&quot; &#39;) &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: Informations sur la version de Java:&quot; $ (version java) &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\necho &quot;DEBUG: Vider la liste du répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\nls -s1h &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n\n\nexportation réponse = &quot;n&quot;\n\n\nécho &quot;&quot;\n\n\nread -t 6 -p &quot;Sur le point de démarrer le serveur. Forcer la réinstallation (y / n)?&quot;\n\n\nsi [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite\n\n\n        echo &quot;INFO: l&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n        echo &quot;L&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot;\n\n\n        install_server\n\n\nFi\n\n\n\n\ncheck_dir\n\n\ncheck_connection\n\n\ncheck_binaries\n\n\n\n\n# boucle pour redémarrer le serveur et vérifier la fréquence des plantages\n\n\na = 0\n\n\nlast_crash = $ ((SECONDS))\n\n\nbien que vrai faire\n\n\n        start_server\n\n\n        b = $?\n\n\n        si [ « $b » -eq « 0 » ]; ensuite\n\n\n                a = 0\n\n\n        autre\n\n\n                maintenant = $ ((SECONDES))\n\n\n                diff = $ (($ now- $ last_crash))\n\n\n                si [ « $diff » -gt « 3600 » ]; ensuite\n\n\n                        a = 1\n\n\n                        autre\n\n\n                        a = $ ((a + 1))\n\n\n                Fi\n\n\n                last_crash = $ ((SECONDS))\n\n\n        Fi\n\n\n        si [ « $a » -eq $CRASH_COUNT ]; ensuite\n\n\n                echo &quot;Le serveur a planté plusieurs fois&quot;\n\n\n                echo &quot;ERREUR: le serveur a échoué et trop de démarrages successifs.&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                sortie 0\n\n\n        Fi\n\n\n\n\n        exportation réponse = &quot;y&quot;\n\n\n        echo &quot;Le serveur va redémarrer dans environ 10 secondes. Aucune entrée requise &#8230;&quot;\n\n\n        read -t 12 -p &quot;Redémarrer maintenant (y) ou sortir du shell (n)?&quot; réponse\n\n\n        si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite\n\n\n                echo &quot;INFO: l&#39;utilisateur a annulé le redémarrage; quitter le shell&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n                sortie 0\n\n\n        Fi\n\n\n\n\n        # re-valider les choses à chaque redémarrage du serveur\n\n\n        check_dir\n\n\n        check_connection\n\n\n        check_binaries\n\n\n        echo &quot;INFO: le serveur redémarre automatiquement à partir de&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1\n\n\n        echo &quot;Redémarrage maintenant!&quot;\n\n\nterminé\n\n\n\nClick to rate this post!\r\n                                   \r\n                               [Total: 0  Average: 0]","paragraphs":["# RAM à allouer au serveur","export MAX_RAM = &quot;8G&quot;","# Nom du fichier pour le fichier forge (requis par certains hôtes)","export FORGE_JAR = &quot;forge.jar&quot;","Arguments de démarrage de la machine virtuelle Java du serveur","export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE = 3&quot;","# Le serveur Max se bloque (à une heure d&#39;intervalle ou moins) pour arrêter le redémarrage automatique (10 par défaut)","export CRASH_COUNT = 10","# Autoriser le script à s&#39;exécuter dans TMP ou dans des répertoires sans accès en lecture / écriture (0 par défaut)","export RUN_FROM_BAD_FOLDER = 0","# Ignorer la connectivité Internet [ping] check (0 par défaut)","export IGNORE_OFFLINE = 0","# Pour les développeurs Modpack","# (Ne modifiez pas sauf si vous savez ce que vous faites)","export MCVER = &quot;1.10.2&quot;","export FORGEVER = &quot;12.18.3.2254&quot;","export FORGEURL = &quot;DISABLE&quot;","#","#","#","#","#","#","#","# Trucs de script internes à partir de maintenant","# Aucune ligne destinée à être modifiée après ici","#","#","#","#","#","# Assurez-vous que les utilisateurs n&#39;essaient pas d&#39;exécuter le script via sh directement (cela ne fonctionnera pas)","si [ ! « $BASH_VERSION » ] ; ensuite","echo &quot;Merci de ne pas utiliser sh pour exécuter ce script ($ 0). Utilisez bash à la place (ou exécutez-le directement)&quot; 1&gt; &amp; 2","sortie 1","Fi","# routine pour gérer l&#39;installation de Forge / serveur","install_server () {","echo &quot;Démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot;","echo &quot;DEBUG: démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","si [ -f installer.jar ]; ensuite","echo &quot;DEBUG: installer.jar trouvé dans le répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","exportation réponse = &quot;n&quot;","read -t 8 -p &quot;Le programme d&#39;installation a été trouvé. Utilisez-le (y) ou téléchargez-vous à nouveau (n)?&quot;","si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite","echo &quot;INFO: Téléchargement en cours. Utilisation d&#39;un fichier d&#39;install.jar existant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Saut de téléchargement. Utilisation du fichier install.jar existant&quot;","Fi","autre","si [ « $FORGEURL » = « DISABLE » ]; ensuite","export URL = &quot;http://files.minecraftforge.net/maven/net/minecraftforge/forge/$VERVER&#8211;$FORGEVERBuch/forge-$$CAUVER_forgeVER-&quot;.","autre","export URL = &quot;$ FORGEURL&quot;","Fi","quel wget &gt;&gt; / dev / null","si [ $? -eq 0 ]; ensuite","echo &quot;DEBUG: (wget) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","wget -O installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","autre","qui curl &gt;&gt; / dev / null","si [ $? -eq 0 ]; ensuite","echo &quot;DEBUG: (curl) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","curl -o installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","autre","echo &quot;Ni wget ni curl n&#39;ont été trouvés sur votre système. Veuillez en installer un et réessayer&quot;","echo &quot;ERREUR: ni wget ni curl n&#39;ont été trouvés&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","Fi","Fi","Fi","si [ ! -f installer.jar ]; ensuite","echo &quot;Le programme d&#39;installation de Forge n&#39;a pas été téléchargé&quot;","echo &quot;ERREUR: le programme d&#39;installation de Forge n&#39;a pas téléchargé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","sortie 0","autre","echo &quot;Déplacement de fichiers / dossiers inutiles vers ./DELETEME&quot;","echo &quot;INFO: Déplacement des fichiers / dossiers inutiles vers ./DELETEME&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","rm -rf ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","mv -f ./asm ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","mv -f ./libraries ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","mv -f ./llibrary ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","mv -f ./minecraft_server*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","mv -f ./forge*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","mv -f ./OpenComputersMod*lua* ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Installation du serveur Forge, veuillez patienter &#8230;&quot;","echo &quot;INFO: Installation du serveur Forge&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","java -jar installer.jar &#8211;installServer &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Suppression du programme d&#39;installation de Forge (n&#39;est plus nécessaire)&quot;","echo &quot;INFO: Suppression du fichier installer.jar&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","rm -rf installer.jar &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Renommer le fichier JAR de forge en $ FORGE_JAR&quot;","echo &quot;DEBUG: renommer forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar en $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","mv &quot;forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar&quot; $ FORGE_JAR &gt;&gt; serverstart.log 2&gt; &amp; 1","Fi","# routine à [re]démarrer le serveur minecraft Forgemodded","start_server ()","écho &quot;&quot;","écho &quot;&quot;","echo &quot;Serveur de démarrage&quot;","echo &quot;INFO: Serveur de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S) &gt;&gt; serverstart.log 2&gt; &amp; 1","java -Xmx $ MAX_RAM $ JAVA_ARGS -jar $ FORGE_JAR nogui","# routine pour les vérifications de répertoire de base","check_dir ()  [ « $(pwd) » = « /var/tmp » ]; ensuite","echo &quot;Le répertoire actuel semble être TMP&quot;","echo &quot;WARN: le répertoire DIR actuel est TEMP&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","si [ $RUN_FROM_BAD_FOLDER -eq 0 ]; ensuite","echo &quot;ERREUR: arrêt dû à un dossier défectueux (TMP)&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Le paramètre RUN_FROM_BAD_FOLDER est désactivé, script de sortie&quot;","sortie 0","autre","echo &quot;WARN: Mauvais dossier (TMP) mais continue malgré tout&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Contournement de cd = arrêt temporaire selon les paramètres du script&quot;","Fi","Fi","si [ ! -r . ]","# routine pour la connectivité ping inet","check_connection ()","si [ $IGNORE_OFFLINE -eq 1 ]; ensuite","echo &quot;WARN: la vérification de la connectivité Internet est désactivée&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Sauter la vérification de la connectivité Internet&quot;","autre","si ping -c 1 8.8.8.8 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite","echo &quot;INFO: Ping to Google DNS réussi&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Ping to Google DNS réussie&quot;","autre","echo &quot;ERREUR: échec de la commande ping vers Google DNS. Pas d&#39;accès à Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Echec de la commande ping vers Google DNS. Pas d&#39;accès Internet?&quot;","Fi","si ping -c 1 4.2.2.1 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite","echo &quot;INFO: Ping to L4 successfull&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Ping to L4 successfull&quot;","autre","echo &quot;ERREUR: Echec de la requête Ping to L4. Pas d&#39;accès Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Ping to L4 a échoué. Pas d&#39;accès à Internet?&quot;","sortie 0","Fi","Fi","# routine pour s&#39;assurer que les fichiers binaires nécessaires sont trouvés","check_binaries ()","si [ ! -f $FORGE_JAR ] ; ensuite","echo &quot;WARN: $ FORGE_JAR introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;","install_server","Fi","si [ ! -f ./minecraft_server.$MCVER.jar ] ; ensuite","echo &quot;WARN: minecraft_server. $ MCVER .jar non trouvé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;","install_server","Fi","si [ ! -d ./libraries ] ; ensuite","echo &quot;WARN: répertoire de la bibliothèque introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;","install_server","Fi","# Le script / le lot commence ici &#8230;","# fichier journal init et informations de base de vidage","echo &quot;INFO: le script de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S)&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: Dumping des variables de départ:&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: MAX_RAM = $ MAX_RAM&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: FORGE_JAR = $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: JAVA_ARGS = $ JAVA_ARGS&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: CRASH_COUNT = $ CRASH_COUNT&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: RUN_FROM_BAD_FOLDER = $ RUN_FROM_BAD_FOLDER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: IGNORE_OFFLINE = $ IGNORE_OFFLINE&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: MCVER = $ MCVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: FORGEVER = $ FORGEVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: FORGEURL = $ FORGEURL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: Informations système de base:&quot; $ (uname -a) &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: Estimation de la RAM totale:&quot; $ (getconf -a | grep PAGES | awk &#39;BEGIN total = 1 if (NR == 1  FIN print total / 1024/1024 &quot;MB&quot; &#39;) &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: Informations sur la version de Java:&quot; $ (version java) &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;DEBUG: Vider la liste du répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","ls -s1h &gt;&gt; serverstart.log 2&gt; &amp; 1","exportation réponse = &quot;n&quot;","écho &quot;&quot;","read -t 6 -p &quot;Sur le point de démarrer le serveur. Forcer la réinstallation (y / n)?&quot;","si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite","echo &quot;INFO: l&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;L&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot;","install_server","Fi","check_dir","check_connection","check_binaries","# boucle pour redémarrer le serveur et vérifier la fréquence des plantages","a = 0","last_crash = $ ((SECONDS))","bien que vrai faire","start_server","b = $?","si [ « $b » -eq « 0 » ]; ensuite","a = 0","autre","maintenant = $ ((SECONDES))","diff = $ (($ now- $ last_crash))","si [ « $diff » -gt « 3600 » ]; ensuite","a = 1","autre","a = $ ((a + 1))","Fi","last_crash = $ ((SECONDS))","Fi","si [ « $a » -eq $CRASH_COUNT ]; ensuite","echo &quot;Le serveur a planté plusieurs fois&quot;","echo &quot;ERREUR: le serveur a échoué et trop de démarrages successifs.&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","sortie 0","Fi","exportation réponse = &quot;y&quot;","echo &quot;Le serveur va redémarrer dans environ 10 secondes. Aucune entrée requise &#8230;&quot;","read -t 12 -p &quot;Redémarrer maintenant (y) ou sortir du shell (n)?&quot; réponse","si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite","echo &quot;INFO: l&#39;utilisateur a annulé le redémarrage; quitter le shell&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","sortie 0","Fi","# re-valider les choses à chaque redémarrage du serveur","check_dir","check_connection","check_binaries","echo &quot;INFO: le serveur redémarre automatiquement à partir de&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","echo &quot;Redémarrage maintenant!&quot;","terminé","Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]"],"content_blocks":[{"id":"text-1","type":"text","heading":"","plain_text":"# RAM à allouer au serveur","html":"<p># RAM à allouer au serveur</p>"},{"id":"text-2","type":"text","heading":"","plain_text":"export MAX_RAM = &quot;8G&quot;","html":"<p>export MAX_RAM = &quot;8G&quot;</p>"},{"id":"text-3","type":"text","heading":"","plain_text":"# Nom du fichier pour le fichier forge (requis par certains hôtes)","html":"<p># Nom du fichier pour le fichier forge (requis par certains hôtes)</p>"},{"id":"text-4","type":"text","heading":"","plain_text":"export FORGE_JAR = &quot;forge.jar&quot;","html":"<p>export FORGE_JAR = &quot;forge.jar&quot;</p>"},{"id":"text-5","type":"text","heading":"","plain_text":"Arguments de démarrage de la machine virtuelle Java du serveur","html":"<p>Arguments de démarrage de la machine virtuelle Java du serveur</p>"},{"id":"text-6","type":"text","heading":"","plain_text":"export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE = 3&quot;","html":"<p>export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE = 3&quot;</p>"},{"id":"text-7","type":"text","heading":"","plain_text":"# Le serveur Max se bloque (à une heure d&#39;intervalle ou moins) pour arrêter le redémarrage automatique (10 par défaut)","html":"<p># Le serveur Max se bloque (à une heure d&#039;intervalle ou moins) pour arrêter le redémarrage automatique (10 par défaut)</p>"},{"id":"text-8","type":"text","heading":"","plain_text":"export CRASH_COUNT = 10","html":"<p>export CRASH_COUNT = 10</p>"},{"id":"text-9","type":"text","heading":"","plain_text":"# Autoriser le script à s&#39;exécuter dans TMP ou dans des répertoires sans accès en lecture / écriture (0 par défaut)","html":"<p># Autoriser le script à s&#039;exécuter dans TMP ou dans des répertoires sans accès en lecture / écriture (0 par défaut)</p>"},{"id":"text-10","type":"text","heading":"","plain_text":"export RUN_FROM_BAD_FOLDER = 0","html":"<p>export RUN_FROM_BAD_FOLDER = 0</p>"},{"id":"text-11","type":"text","heading":"","plain_text":"# Ignorer la connectivité Internet [ping] check (0 par défaut)","html":"<p># Ignorer la connectivité Internet [ping] check (0 par défaut)</p>"},{"id":"text-12","type":"text","heading":"","plain_text":"export IGNORE_OFFLINE = 0","html":"<p>export IGNORE_OFFLINE = 0</p>"},{"id":"text-13","type":"text","heading":"","plain_text":"# Pour les développeurs Modpack","html":"<p># Pour les développeurs Modpack</p>"},{"id":"text-14","type":"text","heading":"","plain_text":"# (Ne modifiez pas sauf si vous savez ce que vous faites)","html":"<p># (Ne modifiez pas sauf si vous savez ce que vous faites)</p>"},{"id":"text-15","type":"text","heading":"","plain_text":"export MCVER = &quot;1.10.2&quot;","html":"<p>export MCVER = &quot;1.10.2&quot;</p>"},{"id":"text-16","type":"text","heading":"","plain_text":"export FORGEVER = &quot;12.18.3.2254&quot;","html":"<p>export FORGEVER = &quot;12.18.3.2254&quot;</p>"},{"id":"text-17","type":"text","heading":"","plain_text":"export FORGEURL = &quot;DISABLE&quot;","html":"<p>export FORGEURL = &quot;DISABLE&quot;</p>"},{"id":"text-18","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-19","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-20","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-21","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-22","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-23","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-24","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-25","type":"text","heading":"","plain_text":"# Trucs de script internes à partir de maintenant","html":"<p># Trucs de script internes à partir de maintenant</p>"},{"id":"text-26","type":"text","heading":"","plain_text":"# Aucune ligne destinée à être modifiée après ici","html":"<p># Aucune ligne destinée à être modifiée après ici</p>"},{"id":"text-27","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-28","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-29","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-30","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-31","type":"text","heading":"","plain_text":"#","html":"<p>#</p>"},{"id":"text-32","type":"text","heading":"","plain_text":"# Assurez-vous que les utilisateurs n&#39;essaient pas d&#39;exécuter le script via sh directement (cela ne fonctionnera pas)","html":"<p># Assurez-vous que les utilisateurs n&#039;essaient pas d&#039;exécuter le script via sh directement (cela ne fonctionnera pas)</p>"},{"id":"text-33","type":"text","heading":"","plain_text":"si [ ! « $BASH_VERSION » ] ; ensuite","html":"<p>si [ ! « $BASH_VERSION » ] ; ensuite</p>"},{"id":"text-34","type":"text","heading":"","plain_text":"echo &quot;Merci de ne pas utiliser sh pour exécuter ce script ($ 0). Utilisez bash à la place (ou exécutez-le directement)&quot; 1&gt; &amp; 2","html":"<p>echo &quot;Merci de ne pas utiliser sh pour exécuter ce script ($ 0). Utilisez bash à la place (ou exécutez-le directement)&quot; 1&gt; &amp; 2</p>"},{"id":"text-35","type":"text","heading":"","plain_text":"sortie 1","html":"<p>sortie 1</p>"},{"id":"text-36","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-37","type":"text","heading":"","plain_text":"# routine pour gérer l&#39;installation de Forge / serveur","html":"<p># routine pour gérer l&#039;installation de Forge / serveur</p>"},{"id":"text-38","type":"text","heading":"","plain_text":"install_server () {","html":"<p>install_server () {</p>"},{"id":"text-39","type":"text","heading":"","plain_text":"echo &quot;Démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot;","html":"<p>echo &quot;Démarrage de l&#039;installation des fichiers binaires du serveur Forge / Minecraft&quot;</p>"},{"id":"text-40","type":"text","heading":"","plain_text":"echo &quot;DEBUG: démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: démarrage de l&#039;installation des fichiers binaires du serveur Forge / Minecraft&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-41","type":"text","heading":"","plain_text":"si [ -f installer.jar ]; ensuite","html":"<p>si [ -f installer.jar ]; ensuite</p>"},{"id":"text-42","type":"text","heading":"","plain_text":"echo &quot;DEBUG: installer.jar trouvé dans le répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: installer.jar trouvé dans le répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-43","type":"text","heading":"","plain_text":"exportation réponse = &quot;n&quot;","html":"<p>exportation réponse = &quot;n&quot;</p>"},{"id":"text-44","type":"text","heading":"","plain_text":"read -t 8 -p &quot;Le programme d&#39;installation a été trouvé. Utilisez-le (y) ou téléchargez-vous à nouveau (n)?&quot;","html":"<p>read -t 8 -p &quot;Le programme d&#039;installation a été trouvé. Utilisez-le (y) ou téléchargez-vous à nouveau (n)?&quot;</p>"},{"id":"text-45","type":"text","heading":"","plain_text":"si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite","html":"<p>si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite</p>"},{"id":"text-46","type":"text","heading":"","plain_text":"echo &quot;INFO: Téléchargement en cours. Utilisation d&#39;un fichier d&#39;install.jar existant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Téléchargement en cours. Utilisation d&#039;un fichier d&#039;install.jar existant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-47","type":"text","heading":"","plain_text":"echo &quot;Saut de téléchargement. Utilisation du fichier install.jar existant&quot;","html":"<p>echo &quot;Saut de téléchargement. Utilisation du fichier install.jar existant&quot;</p>"},{"id":"text-48","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-49","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-50","type":"text","heading":"","plain_text":"si [ « $FORGEURL » = « DISABLE » ]; ensuite","html":"<p>si [ « $FORGEURL » = « DISABLE » ]; ensuite</p>"},{"id":"text-51","type":"text","heading":"","plain_text":"export URL = &quot;http://files.minecraftforge.net/maven/net/minecraftforge/forge/$VERVER&#8211;$FORGEVERBuch/forge-$$CAUVER_forgeVER-&quot;.","html":"<p>export URL = &quot;http://files.minecraftforge.net/maven/net/minecraftforge/forge/$VERVER&#8211;$FORGEVERBuch/forge-$$CAUVER_forgeVER-&quot;.</p>"},{"id":"text-52","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-53","type":"text","heading":"","plain_text":"export URL = &quot;$ FORGEURL&quot;","html":"<p>export URL = &quot;$ FORGEURL&quot;</p>"},{"id":"text-54","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-55","type":"text","heading":"","plain_text":"quel wget &gt;&gt; / dev / null","html":"<p>quel wget &gt;&gt; / dev / null</p>"},{"id":"text-56","type":"text","heading":"","plain_text":"si [ $? -eq 0 ]; ensuite","html":"<p>si [ $? -eq 0 ]; ensuite</p>"},{"id":"text-57","type":"text","heading":"","plain_text":"echo &quot;DEBUG: (wget) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: (wget) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-58","type":"text","heading":"","plain_text":"wget -O installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>wget -O installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-59","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-60","type":"text","heading":"","plain_text":"qui curl &gt;&gt; / dev / null","html":"<p>qui curl &gt;&gt; / dev / null</p>"},{"id":"text-61","type":"text","heading":"","plain_text":"si [ $? -eq 0 ]; ensuite","html":"<p>si [ $? -eq 0 ]; ensuite</p>"},{"id":"text-62","type":"text","heading":"","plain_text":"echo &quot;DEBUG: (curl) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: (curl) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-63","type":"text","heading":"","plain_text":"curl -o installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>curl -o installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-64","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-65","type":"text","heading":"","plain_text":"echo &quot;Ni wget ni curl n&#39;ont été trouvés sur votre système. Veuillez en installer un et réessayer&quot;","html":"<p>echo &quot;Ni wget ni curl n&#039;ont été trouvés sur votre système. Veuillez en installer un et réessayer&quot;</p>"},{"id":"text-66","type":"text","heading":"","plain_text":"echo &quot;ERREUR: ni wget ni curl n&#39;ont été trouvés&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;ERREUR: ni wget ni curl n&#039;ont été trouvés&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-67","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-68","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-69","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-70","type":"text","heading":"","plain_text":"si [ ! -f installer.jar ]; ensuite","html":"<p>si [ ! -f installer.jar ]; ensuite</p>"},{"id":"text-71","type":"text","heading":"","plain_text":"echo &quot;Le programme d&#39;installation de Forge n&#39;a pas été téléchargé&quot;","html":"<p>echo &quot;Le programme d&#039;installation de Forge n&#039;a pas été téléchargé&quot;</p>"},{"id":"text-72","type":"text","heading":"","plain_text":"echo &quot;ERREUR: le programme d&#39;installation de Forge n&#39;a pas téléchargé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;ERREUR: le programme d&#039;installation de Forge n&#039;a pas téléchargé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-73","type":"text","heading":"","plain_text":"sortie 0","html":"<p>sortie 0</p>"},{"id":"text-74","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-75","type":"text","heading":"","plain_text":"echo &quot;Déplacement de fichiers / dossiers inutiles vers ./DELETEME&quot;","html":"<p>echo &quot;Déplacement de fichiers / dossiers inutiles vers ./DELETEME&quot;</p>"},{"id":"text-76","type":"text","heading":"","plain_text":"echo &quot;INFO: Déplacement des fichiers / dossiers inutiles vers ./DELETEME&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Déplacement des fichiers / dossiers inutiles vers ./DELETEME&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-77","type":"text","heading":"","plain_text":"rm -rf ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>rm -rf ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-78","type":"text","heading":"","plain_text":"mv -f ./asm ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv -f ./asm ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-79","type":"text","heading":"","plain_text":"mv -f ./libraries ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv -f ./libraries ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-80","type":"text","heading":"","plain_text":"mv -f ./llibrary ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv -f ./llibrary ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-81","type":"text","heading":"","plain_text":"mv -f ./minecraft_server*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv -f ./minecraft_server*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-82","type":"text","heading":"","plain_text":"mv -f ./forge*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv -f ./forge*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-83","type":"text","heading":"","plain_text":"mv -f ./OpenComputersMod*lua* ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv -f ./OpenComputersMod*lua* ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-84","type":"text","heading":"","plain_text":"echo &quot;Installation du serveur Forge, veuillez patienter &#8230;&quot;","html":"<p>echo &quot;Installation du serveur Forge, veuillez patienter &#8230;&quot;</p>"},{"id":"text-85","type":"text","heading":"","plain_text":"echo &quot;INFO: Installation du serveur Forge&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Installation du serveur Forge&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-86","type":"text","heading":"","plain_text":"java -jar installer.jar &#8211;installServer &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>java -jar installer.jar &#8211;installServer &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-87","type":"text","heading":"","plain_text":"echo &quot;Suppression du programme d&#39;installation de Forge (n&#39;est plus nécessaire)&quot;","html":"<p>echo &quot;Suppression du programme d&#039;installation de Forge (n&#039;est plus nécessaire)&quot;</p>"},{"id":"text-88","type":"text","heading":"","plain_text":"echo &quot;INFO: Suppression du fichier installer.jar&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Suppression du fichier installer.jar&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-89","type":"text","heading":"","plain_text":"rm -rf installer.jar &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>rm -rf installer.jar &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-90","type":"text","heading":"","plain_text":"echo &quot;Renommer le fichier JAR de forge en $ FORGE_JAR&quot;","html":"<p>echo &quot;Renommer le fichier JAR de forge en $ FORGE_JAR&quot;</p>"},{"id":"text-91","type":"text","heading":"","plain_text":"echo &quot;DEBUG: renommer forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar en $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: renommer forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar en $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-92","type":"text","heading":"","plain_text":"mv &quot;forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar&quot; $ FORGE_JAR &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>mv &quot;forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar&quot; $ FORGE_JAR &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-93","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-94","type":"text","heading":"","plain_text":"# routine à [re]démarrer le serveur minecraft Forgemodded","html":"<p># routine à [re]démarrer le serveur minecraft Forgemodded</p>"},{"id":"text-95","type":"text","heading":"","plain_text":"start_server ()","html":"<p>start_server ()</p>"},{"id":"text-96","type":"text","heading":"","plain_text":"écho &quot;&quot;","html":"<p>écho &quot;&quot;</p>"},{"id":"text-97","type":"text","heading":"","plain_text":"écho &quot;&quot;","html":"<p>écho &quot;&quot;</p>"},{"id":"text-98","type":"text","heading":"","plain_text":"echo &quot;Serveur de démarrage&quot;","html":"<p>echo &quot;Serveur de démarrage&quot;</p>"},{"id":"text-99","type":"text","heading":"","plain_text":"echo &quot;INFO: Serveur de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S) &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Serveur de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S) &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-100","type":"text","heading":"","plain_text":"java -Xmx $ MAX_RAM $ JAVA_ARGS -jar $ FORGE_JAR nogui","html":"<p>java -Xmx $ MAX_RAM $ JAVA_ARGS -jar $ FORGE_JAR nogui</p>"},{"id":"text-101","type":"text","heading":"","plain_text":"# routine pour les vérifications de répertoire de base","html":"<p># routine pour les vérifications de répertoire de base</p>"},{"id":"text-102","type":"text","heading":"","plain_text":"check_dir ()  [ « $(pwd) » = « /var/tmp » ]; ensuite","html":"<p>check_dir ()  [ « $(pwd) » = « /var/tmp » ]; ensuite</p>"},{"id":"text-103","type":"text","heading":"","plain_text":"echo &quot;Le répertoire actuel semble être TMP&quot;","html":"<p>echo &quot;Le répertoire actuel semble être TMP&quot;</p>"},{"id":"text-104","type":"text","heading":"","plain_text":"echo &quot;WARN: le répertoire DIR actuel est TEMP&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;WARN: le répertoire DIR actuel est TEMP&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-105","type":"text","heading":"","plain_text":"si [ $RUN_FROM_BAD_FOLDER -eq 0 ]; ensuite","html":"<p>si [ $RUN_FROM_BAD_FOLDER -eq 0 ]; ensuite</p>"},{"id":"text-106","type":"text","heading":"","plain_text":"echo &quot;ERREUR: arrêt dû à un dossier défectueux (TMP)&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;ERREUR: arrêt dû à un dossier défectueux (TMP)&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-107","type":"text","heading":"","plain_text":"echo &quot;Le paramètre RUN_FROM_BAD_FOLDER est désactivé, script de sortie&quot;","html":"<p>echo &quot;Le paramètre RUN_FROM_BAD_FOLDER est désactivé, script de sortie&quot;</p>"},{"id":"text-108","type":"text","heading":"","plain_text":"sortie 0","html":"<p>sortie 0</p>"},{"id":"text-109","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-110","type":"text","heading":"","plain_text":"echo &quot;WARN: Mauvais dossier (TMP) mais continue malgré tout&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;WARN: Mauvais dossier (TMP) mais continue malgré tout&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-111","type":"text","heading":"","plain_text":"echo &quot;Contournement de cd = arrêt temporaire selon les paramètres du script&quot;","html":"<p>echo &quot;Contournement de cd = arrêt temporaire selon les paramètres du script&quot;</p>"},{"id":"text-112","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-113","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-114","type":"text","heading":"","plain_text":"si [ ! -r . ]","html":"<p>si [ ! -r . ]</p>"},{"id":"text-115","type":"text","heading":"","plain_text":"# routine pour la connectivité ping inet","html":"<p># routine pour la connectivité ping inet</p>"},{"id":"text-116","type":"text","heading":"","plain_text":"check_connection ()","html":"<p>check_connection ()</p>"},{"id":"text-117","type":"text","heading":"","plain_text":"si [ $IGNORE_OFFLINE -eq 1 ]; ensuite","html":"<p>si [ $IGNORE_OFFLINE -eq 1 ]; ensuite</p>"},{"id":"text-118","type":"text","heading":"","plain_text":"echo &quot;WARN: la vérification de la connectivité Internet est désactivée&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;WARN: la vérification de la connectivité Internet est désactivée&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-119","type":"text","heading":"","plain_text":"echo &quot;Sauter la vérification de la connectivité Internet&quot;","html":"<p>echo &quot;Sauter la vérification de la connectivité Internet&quot;</p>"},{"id":"text-120","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-121","type":"text","heading":"","plain_text":"si ping -c 1 8.8.8.8 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite","html":"<p>si ping -c 1 8.8.8.8 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite</p>"},{"id":"text-122","type":"text","heading":"","plain_text":"echo &quot;INFO: Ping to Google DNS réussi&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Ping to Google DNS réussi&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-123","type":"text","heading":"","plain_text":"echo &quot;Ping to Google DNS réussie&quot;","html":"<p>echo &quot;Ping to Google DNS réussie&quot;</p>"},{"id":"text-124","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-125","type":"text","heading":"","plain_text":"echo &quot;ERREUR: échec de la commande ping vers Google DNS. Pas d&#39;accès à Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;ERREUR: échec de la commande ping vers Google DNS. Pas d&#039;accès à Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-126","type":"text","heading":"","plain_text":"echo &quot;Echec de la commande ping vers Google DNS. Pas d&#39;accès Internet?&quot;","html":"<p>echo &quot;Echec de la commande ping vers Google DNS. Pas d&#039;accès Internet?&quot;</p>"},{"id":"text-127","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-128","type":"text","heading":"","plain_text":"si ping -c 1 4.2.2.1 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite","html":"<p>si ping -c 1 4.2.2.1 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite</p>"},{"id":"text-129","type":"text","heading":"","plain_text":"echo &quot;INFO: Ping to L4 successfull&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: Ping to L4 successfull&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-130","type":"text","heading":"","plain_text":"echo &quot;Ping to L4 successfull&quot;","html":"<p>echo &quot;Ping to L4 successfull&quot;</p>"},{"id":"text-131","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-132","type":"text","heading":"","plain_text":"echo &quot;ERREUR: Echec de la requête Ping to L4. Pas d&#39;accès Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;ERREUR: Echec de la requête Ping to L4. Pas d&#039;accès Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-133","type":"text","heading":"","plain_text":"echo &quot;Ping to L4 a échoué. Pas d&#39;accès à Internet?&quot;","html":"<p>echo &quot;Ping to L4 a échoué. Pas d&#039;accès à Internet?&quot;</p>"},{"id":"text-134","type":"text","heading":"","plain_text":"sortie 0","html":"<p>sortie 0</p>"},{"id":"text-135","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-136","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-137","type":"text","heading":"","plain_text":"# routine pour s&#39;assurer que les fichiers binaires nécessaires sont trouvés","html":"<p># routine pour s&#039;assurer que les fichiers binaires nécessaires sont trouvés</p>"},{"id":"text-138","type":"text","heading":"","plain_text":"check_binaries ()","html":"<p>check_binaries ()</p>"},{"id":"text-139","type":"text","heading":"","plain_text":"si [ ! -f $FORGE_JAR ] ; ensuite","html":"<p>si [ ! -f $FORGE_JAR ] ; ensuite</p>"},{"id":"text-140","type":"text","heading":"","plain_text":"echo &quot;WARN: $ FORGE_JAR introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;WARN: $ FORGE_JAR introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-141","type":"text","heading":"","plain_text":"echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;","html":"<p>echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;</p>"},{"id":"text-142","type":"text","heading":"","plain_text":"install_server","html":"<p>install_server</p>"},{"id":"text-143","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-144","type":"text","heading":"","plain_text":"si [ ! -f ./minecraft_server.$MCVER.jar ] ; ensuite","html":"<p>si [ ! -f ./minecraft_server.$MCVER.jar ] ; ensuite</p>"},{"id":"text-145","type":"text","heading":"","plain_text":"echo &quot;WARN: minecraft_server. $ MCVER .jar non trouvé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;WARN: minecraft_server. $ MCVER .jar non trouvé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-146","type":"text","heading":"","plain_text":"echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;","html":"<p>echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;</p>"},{"id":"text-147","type":"text","heading":"","plain_text":"install_server","html":"<p>install_server</p>"},{"id":"text-148","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-149","type":"text","heading":"","plain_text":"si [ ! -d ./libraries ] ; ensuite","html":"<p>si [ ! -d ./libraries ] ; ensuite</p>"},{"id":"text-150","type":"text","heading":"","plain_text":"echo &quot;WARN: répertoire de la bibliothèque introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;WARN: répertoire de la bibliothèque introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-151","type":"text","heading":"","plain_text":"echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;","html":"<p>echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;</p>"},{"id":"text-152","type":"text","heading":"","plain_text":"install_server","html":"<p>install_server</p>"},{"id":"text-153","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-154","type":"text","heading":"","plain_text":"# Le script / le lot commence ici &#8230;","html":"<p># Le script / le lot commence ici &#8230;</p>"},{"id":"text-155","type":"text","heading":"","plain_text":"# fichier journal init et informations de base de vidage","html":"<p># fichier journal init et informations de base de vidage</p>"},{"id":"text-156","type":"text","heading":"","plain_text":"echo &quot;INFO: le script de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S)&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: le script de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S)&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-157","type":"text","heading":"","plain_text":"echo &quot;DEBUG: Dumping des variables de départ:&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: Dumping des variables de départ:&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-158","type":"text","heading":"","plain_text":"echo &quot;DEBUG: MAX_RAM = $ MAX_RAM&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: MAX_RAM = $ MAX_RAM&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-159","type":"text","heading":"","plain_text":"echo &quot;DEBUG: FORGE_JAR = $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: FORGE_JAR = $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-160","type":"text","heading":"","plain_text":"echo &quot;DEBUG: JAVA_ARGS = $ JAVA_ARGS&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: JAVA_ARGS = $ JAVA_ARGS&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-161","type":"text","heading":"","plain_text":"echo &quot;DEBUG: CRASH_COUNT = $ CRASH_COUNT&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: CRASH_COUNT = $ CRASH_COUNT&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-162","type":"text","heading":"","plain_text":"echo &quot;DEBUG: RUN_FROM_BAD_FOLDER = $ RUN_FROM_BAD_FOLDER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: RUN_FROM_BAD_FOLDER = $ RUN_FROM_BAD_FOLDER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-163","type":"text","heading":"","plain_text":"echo &quot;DEBUG: IGNORE_OFFLINE = $ IGNORE_OFFLINE&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: IGNORE_OFFLINE = $ IGNORE_OFFLINE&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-164","type":"text","heading":"","plain_text":"echo &quot;DEBUG: MCVER = $ MCVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: MCVER = $ MCVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-165","type":"text","heading":"","plain_text":"echo &quot;DEBUG: FORGEVER = $ FORGEVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: FORGEVER = $ FORGEVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-166","type":"text","heading":"","plain_text":"echo &quot;DEBUG: FORGEURL = $ FORGEURL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: FORGEURL = $ FORGEURL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-167","type":"text","heading":"","plain_text":"echo &quot;DEBUG: Informations système de base:&quot; $ (uname -a) &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: Informations système de base:&quot; $ (uname -a) &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-168","type":"text","heading":"","plain_text":"echo &quot;DEBUG: Estimation de la RAM totale:&quot; $ (getconf -a | grep PAGES | awk &#39;BEGIN total = 1 if (NR == 1  FIN print total / 1024/1024 &quot;MB&quot; &#39;) &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: Estimation de la RAM totale:&quot; $ (getconf -a | grep PAGES | awk &#039;BEGIN total = 1 if (NR == 1  FIN print total / 1024/1024 &quot;MB&quot; &#039;) &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-169","type":"text","heading":"","plain_text":"echo &quot;DEBUG: Informations sur la version de Java:&quot; $ (version java) &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: Informations sur la version de Java:&quot; $ (version java) &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-170","type":"text","heading":"","plain_text":"echo &quot;DEBUG: Vider la liste du répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;DEBUG: Vider la liste du répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-171","type":"text","heading":"","plain_text":"ls -s1h &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>ls -s1h &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-172","type":"text","heading":"","plain_text":"exportation réponse = &quot;n&quot;","html":"<p>exportation réponse = &quot;n&quot;</p>"},{"id":"text-173","type":"text","heading":"","plain_text":"écho &quot;&quot;","html":"<p>écho &quot;&quot;</p>"},{"id":"text-174","type":"text","heading":"","plain_text":"read -t 6 -p &quot;Sur le point de démarrer le serveur. Forcer la réinstallation (y / n)?&quot;","html":"<p>read -t 6 -p &quot;Sur le point de démarrer le serveur. Forcer la réinstallation (y / n)?&quot;</p>"},{"id":"text-175","type":"text","heading":"","plain_text":"si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite","html":"<p>si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite</p>"},{"id":"text-176","type":"text","heading":"","plain_text":"echo &quot;INFO: l&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: l&#039;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-177","type":"text","heading":"","plain_text":"echo &quot;L&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot;","html":"<p>echo &quot;L&#039;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot;</p>"},{"id":"text-178","type":"text","heading":"","plain_text":"install_server","html":"<p>install_server</p>"},{"id":"text-179","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-180","type":"text","heading":"","plain_text":"check_dir","html":"<p>check_dir</p>"},{"id":"text-181","type":"text","heading":"","plain_text":"check_connection","html":"<p>check_connection</p>"},{"id":"text-182","type":"text","heading":"","plain_text":"check_binaries","html":"<p>check_binaries</p>"},{"id":"text-183","type":"text","heading":"","plain_text":"# boucle pour redémarrer le serveur et vérifier la fréquence des plantages","html":"<p># boucle pour redémarrer le serveur et vérifier la fréquence des plantages</p>"},{"id":"text-184","type":"text","heading":"","plain_text":"a = 0","html":"<p>a = 0</p>"},{"id":"text-185","type":"text","heading":"","plain_text":"last_crash = $ ((SECONDS))","html":"<p>last_crash = $ ((SECONDS))</p>"},{"id":"text-186","type":"text","heading":"","plain_text":"bien que vrai faire","html":"<p>bien que vrai faire</p>"},{"id":"text-187","type":"text","heading":"","plain_text":"start_server","html":"<p>start_server</p>"},{"id":"text-188","type":"text","heading":"","plain_text":"b = $?","html":"<p>b = $?</p>"},{"id":"text-189","type":"text","heading":"","plain_text":"si [ « $b » -eq « 0 » ]; ensuite","html":"<p>si [ « $b » -eq « 0 » ]; ensuite</p>"},{"id":"text-190","type":"text","heading":"","plain_text":"a = 0","html":"<p>a = 0</p>"},{"id":"text-191","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-192","type":"text","heading":"","plain_text":"maintenant = $ ((SECONDES))","html":"<p>maintenant = $ ((SECONDES))</p>"},{"id":"text-193","type":"text","heading":"","plain_text":"diff = $ (($ now- $ last_crash))","html":"<p>diff = $ (($ now- $ last_crash))</p>"},{"id":"text-194","type":"text","heading":"","plain_text":"si [ « $diff » -gt « 3600 » ]; ensuite","html":"<p>si [ « $diff » -gt « 3600 » ]; ensuite</p>"},{"id":"text-195","type":"text","heading":"","plain_text":"a = 1","html":"<p>a = 1</p>"},{"id":"text-196","type":"text","heading":"","plain_text":"autre","html":"<p>autre</p>"},{"id":"text-197","type":"text","heading":"","plain_text":"a = $ ((a + 1))","html":"<p>a = $ ((a + 1))</p>"},{"id":"text-198","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-199","type":"text","heading":"","plain_text":"last_crash = $ ((SECONDS))","html":"<p>last_crash = $ ((SECONDS))</p>"},{"id":"text-200","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-201","type":"text","heading":"","plain_text":"si [ « $a » -eq $CRASH_COUNT ]; ensuite","html":"<p>si [ « $a » -eq $CRASH_COUNT ]; ensuite</p>"},{"id":"text-202","type":"text","heading":"","plain_text":"echo &quot;Le serveur a planté plusieurs fois&quot;","html":"<p>echo &quot;Le serveur a planté plusieurs fois&quot;</p>"},{"id":"text-203","type":"text","heading":"","plain_text":"echo &quot;ERREUR: le serveur a échoué et trop de démarrages successifs.&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;ERREUR: le serveur a échoué et trop de démarrages successifs.&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-204","type":"text","heading":"","plain_text":"sortie 0","html":"<p>sortie 0</p>"},{"id":"text-205","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-206","type":"text","heading":"","plain_text":"exportation réponse = &quot;y&quot;","html":"<p>exportation réponse = &quot;y&quot;</p>"},{"id":"text-207","type":"text","heading":"","plain_text":"echo &quot;Le serveur va redémarrer dans environ 10 secondes. Aucune entrée requise &#8230;&quot;","html":"<p>echo &quot;Le serveur va redémarrer dans environ 10 secondes. Aucune entrée requise &#8230;&quot;</p>"},{"id":"text-208","type":"text","heading":"","plain_text":"read -t 12 -p &quot;Redémarrer maintenant (y) ou sortir du shell (n)?&quot; réponse","html":"<p>read -t 12 -p &quot;Redémarrer maintenant (y) ou sortir du shell (n)?&quot; réponse</p>"},{"id":"text-209","type":"text","heading":"","plain_text":"si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite","html":"<p>si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite</p>"},{"id":"text-210","type":"text","heading":"","plain_text":"echo &quot;INFO: l&#39;utilisateur a annulé le redémarrage; quitter le shell&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: l&#039;utilisateur a annulé le redémarrage; quitter le shell&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-211","type":"text","heading":"","plain_text":"sortie 0","html":"<p>sortie 0</p>"},{"id":"text-212","type":"text","heading":"","plain_text":"Fi","html":"<p>Fi</p>"},{"id":"text-213","type":"text","heading":"","plain_text":"# re-valider les choses à chaque redémarrage du serveur","html":"<p># re-valider les choses à chaque redémarrage du serveur</p>"},{"id":"text-214","type":"text","heading":"","plain_text":"check_dir","html":"<p>check_dir</p>"},{"id":"text-215","type":"text","heading":"","plain_text":"check_connection","html":"<p>check_connection</p>"},{"id":"text-216","type":"text","heading":"","plain_text":"check_binaries","html":"<p>check_binaries</p>"},{"id":"text-217","type":"text","heading":"","plain_text":"echo &quot;INFO: le serveur redémarre automatiquement à partir de&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1","html":"<p>echo &quot;INFO: le serveur redémarre automatiquement à partir de&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1</p>"},{"id":"text-218","type":"text","heading":"","plain_text":"echo &quot;Redémarrage maintenant!&quot;","html":"<p>echo &quot;Redémarrage maintenant!&quot;</p>"},{"id":"text-219","type":"text","heading":"","plain_text":"terminé","html":"<p>terminé</p>"},{"id":"text-220","type":"text","heading":"","plain_text":"Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]","html":"<p>Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]</p>"}],"sections":[{"id":"text-1","heading":"Text","content":"# RAM à allouer au serveur"},{"id":"text-2","heading":"Text","content":"export MAX_RAM = &quot;8G&quot;"},{"id":"text-3","heading":"Text","content":"# Nom du fichier pour le fichier forge (requis par certains hôtes)"},{"id":"text-4","heading":"Text","content":"export FORGE_JAR = &quot;forge.jar&quot;"},{"id":"text-5","heading":"Text","content":"Arguments de démarrage de la machine virtuelle Java du serveur"},{"id":"text-6","heading":"Text","content":"export JAVA_ARGS = &quot;- XX: + ExplicitGCInvokesConcurrent -XX: + ExplicitGCInvokesConcurrentAndUnloadsClasses -XX: + UseConcMarkSweepGC -XX: MaxGCPauseMillis = 250 -XX: UseSSE = 3&quot;"},{"id":"text-7","heading":"Text","content":"# Le serveur Max se bloque (à une heure d&#39;intervalle ou moins) pour arrêter le redémarrage automatique (10 par défaut)"},{"id":"text-8","heading":"Text","content":"export CRASH_COUNT = 10"},{"id":"text-9","heading":"Text","content":"# Autoriser le script à s&#39;exécuter dans TMP ou dans des répertoires sans accès en lecture / écriture (0 par défaut)"},{"id":"text-10","heading":"Text","content":"export RUN_FROM_BAD_FOLDER = 0"},{"id":"text-11","heading":"Text","content":"# Ignorer la connectivité Internet [ping] check (0 par défaut)"},{"id":"text-12","heading":"Text","content":"export IGNORE_OFFLINE = 0"},{"id":"text-13","heading":"Text","content":"# Pour les développeurs Modpack"},{"id":"text-14","heading":"Text","content":"# (Ne modifiez pas sauf si vous savez ce que vous faites)"},{"id":"text-15","heading":"Text","content":"export MCVER = &quot;1.10.2&quot;"},{"id":"text-16","heading":"Text","content":"export FORGEVER = &quot;12.18.3.2254&quot;"},{"id":"text-17","heading":"Text","content":"export FORGEURL = &quot;DISABLE&quot;"},{"id":"text-18","heading":"Text","content":"#"},{"id":"text-19","heading":"Text","content":"#"},{"id":"text-20","heading":"Text","content":"#"},{"id":"text-21","heading":"Text","content":"#"},{"id":"text-22","heading":"Text","content":"#"},{"id":"text-23","heading":"Text","content":"#"},{"id":"text-24","heading":"Text","content":"#"},{"id":"text-25","heading":"Text","content":"# Trucs de script internes à partir de maintenant"},{"id":"text-26","heading":"Text","content":"# Aucune ligne destinée à être modifiée après ici"},{"id":"text-27","heading":"Text","content":"#"},{"id":"text-28","heading":"Text","content":"#"},{"id":"text-29","heading":"Text","content":"#"},{"id":"text-30","heading":"Text","content":"#"},{"id":"text-31","heading":"Text","content":"#"},{"id":"text-32","heading":"Text","content":"# Assurez-vous que les utilisateurs n&#39;essaient pas d&#39;exécuter le script via sh directement (cela ne fonctionnera pas)"},{"id":"text-33","heading":"Text","content":"si [ ! « $BASH_VERSION » ] ; ensuite"},{"id":"text-34","heading":"Text","content":"echo &quot;Merci de ne pas utiliser sh pour exécuter ce script ($ 0). Utilisez bash à la place (ou exécutez-le directement)&quot; 1&gt; &amp; 2"},{"id":"text-35","heading":"Text","content":"sortie 1"},{"id":"text-36","heading":"Text","content":"Fi"},{"id":"text-37","heading":"Text","content":"# routine pour gérer l&#39;installation de Forge / serveur"},{"id":"text-38","heading":"Text","content":"install_server () {"},{"id":"text-39","heading":"Text","content":"echo &quot;Démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot;"},{"id":"text-40","heading":"Text","content":"echo &quot;DEBUG: démarrage de l&#39;installation des fichiers binaires du serveur Forge / Minecraft&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-41","heading":"Text","content":"si [ -f installer.jar ]; ensuite"},{"id":"text-42","heading":"Text","content":"echo &quot;DEBUG: installer.jar trouvé dans le répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-43","heading":"Text","content":"exportation réponse = &quot;n&quot;"},{"id":"text-44","heading":"Text","content":"read -t 8 -p &quot;Le programme d&#39;installation a été trouvé. Utilisez-le (y) ou téléchargez-vous à nouveau (n)?&quot;"},{"id":"text-45","heading":"Text","content":"si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite"},{"id":"text-46","heading":"Text","content":"echo &quot;INFO: Téléchargement en cours. Utilisation d&#39;un fichier d&#39;install.jar existant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-47","heading":"Text","content":"echo &quot;Saut de téléchargement. Utilisation du fichier install.jar existant&quot;"},{"id":"text-48","heading":"Text","content":"Fi"},{"id":"text-49","heading":"Text","content":"autre"},{"id":"text-50","heading":"Text","content":"si [ « $FORGEURL » = « DISABLE » ]; ensuite"},{"id":"text-51","heading":"Text","content":"export URL = &quot;http://files.minecraftforge.net/maven/net/minecraftforge/forge/$VERVER&#8211;$FORGEVERBuch/forge-$$CAUVER_forgeVER-&quot;."},{"id":"text-52","heading":"Text","content":"autre"},{"id":"text-53","heading":"Text","content":"export URL = &quot;$ FORGEURL&quot;"},{"id":"text-54","heading":"Text","content":"Fi"},{"id":"text-55","heading":"Text","content":"quel wget &gt;&gt; / dev / null"},{"id":"text-56","heading":"Text","content":"si [ $? -eq 0 ]; ensuite"},{"id":"text-57","heading":"Text","content":"echo &quot;DEBUG: (wget) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-58","heading":"Text","content":"wget -O installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-59","heading":"Text","content":"autre"},{"id":"text-60","heading":"Text","content":"qui curl &gt;&gt; / dev / null"},{"id":"text-61","heading":"Text","content":"si [ $? -eq 0 ]; ensuite"},{"id":"text-62","heading":"Text","content":"echo &quot;DEBUG: (curl) Téléchargement de $ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-63","heading":"Text","content":"curl -o installer.jar &quot;$ URL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-64","heading":"Text","content":"autre"},{"id":"text-65","heading":"Text","content":"echo &quot;Ni wget ni curl n&#39;ont été trouvés sur votre système. Veuillez en installer un et réessayer&quot;"},{"id":"text-66","heading":"Text","content":"echo &quot;ERREUR: ni wget ni curl n&#39;ont été trouvés&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-67","heading":"Text","content":"Fi"},{"id":"text-68","heading":"Text","content":"Fi"},{"id":"text-69","heading":"Text","content":"Fi"},{"id":"text-70","heading":"Text","content":"si [ ! -f installer.jar ]; ensuite"},{"id":"text-71","heading":"Text","content":"echo &quot;Le programme d&#39;installation de Forge n&#39;a pas été téléchargé&quot;"},{"id":"text-72","heading":"Text","content":"echo &quot;ERREUR: le programme d&#39;installation de Forge n&#39;a pas téléchargé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-73","heading":"Text","content":"sortie 0"},{"id":"text-74","heading":"Text","content":"autre"},{"id":"text-75","heading":"Text","content":"echo &quot;Déplacement de fichiers / dossiers inutiles vers ./DELETEME&quot;"},{"id":"text-76","heading":"Text","content":"echo &quot;INFO: Déplacement des fichiers / dossiers inutiles vers ./DELETEME&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-77","heading":"Text","content":"rm -rf ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-78","heading":"Text","content":"mv -f ./asm ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-79","heading":"Text","content":"mv -f ./libraries ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-80","heading":"Text","content":"mv -f ./llibrary ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-81","heading":"Text","content":"mv -f ./minecraft_server*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-82","heading":"Text","content":"mv -f ./forge*.jar ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-83","heading":"Text","content":"mv -f ./OpenComputersMod*lua* ./DELETEME &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-84","heading":"Text","content":"echo &quot;Installation du serveur Forge, veuillez patienter &#8230;&quot;"},{"id":"text-85","heading":"Text","content":"echo &quot;INFO: Installation du serveur Forge&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-86","heading":"Text","content":"java -jar installer.jar &#8211;installServer &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-87","heading":"Text","content":"echo &quot;Suppression du programme d&#39;installation de Forge (n&#39;est plus nécessaire)&quot;"},{"id":"text-88","heading":"Text","content":"echo &quot;INFO: Suppression du fichier installer.jar&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-89","heading":"Text","content":"rm -rf installer.jar &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-90","heading":"Text","content":"echo &quot;Renommer le fichier JAR de forge en $ FORGE_JAR&quot;"},{"id":"text-91","heading":"Text","content":"echo &quot;DEBUG: renommer forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar en $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-92","heading":"Text","content":"mv &quot;forge &#8211; $ MCVER &#8211; $ FORGEVER -universal.jar&quot; $ FORGE_JAR &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-93","heading":"Text","content":"Fi"},{"id":"text-94","heading":"Text","content":"# routine à [re]démarrer le serveur minecraft Forgemodded"},{"id":"text-95","heading":"Text","content":"start_server ()"},{"id":"text-96","heading":"Text","content":"écho &quot;&quot;"},{"id":"text-97","heading":"Text","content":"écho &quot;&quot;"},{"id":"text-98","heading":"Text","content":"echo &quot;Serveur de démarrage&quot;"},{"id":"text-99","heading":"Text","content":"echo &quot;INFO: Serveur de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S) &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-100","heading":"Text","content":"java -Xmx $ MAX_RAM $ JAVA_ARGS -jar $ FORGE_JAR nogui"},{"id":"text-101","heading":"Text","content":"# routine pour les vérifications de répertoire de base"},{"id":"text-102","heading":"Text","content":"check_dir ()  [ « $(pwd) » = « /var/tmp » ]; ensuite"},{"id":"text-103","heading":"Text","content":"echo &quot;Le répertoire actuel semble être TMP&quot;"},{"id":"text-104","heading":"Text","content":"echo &quot;WARN: le répertoire DIR actuel est TEMP&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-105","heading":"Text","content":"si [ $RUN_FROM_BAD_FOLDER -eq 0 ]; ensuite"},{"id":"text-106","heading":"Text","content":"echo &quot;ERREUR: arrêt dû à un dossier défectueux (TMP)&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-107","heading":"Text","content":"echo &quot;Le paramètre RUN_FROM_BAD_FOLDER est désactivé, script de sortie&quot;"},{"id":"text-108","heading":"Text","content":"sortie 0"},{"id":"text-109","heading":"Text","content":"autre"},{"id":"text-110","heading":"Text","content":"echo &quot;WARN: Mauvais dossier (TMP) mais continue malgré tout&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-111","heading":"Text","content":"echo &quot;Contournement de cd = arrêt temporaire selon les paramètres du script&quot;"},{"id":"text-112","heading":"Text","content":"Fi"},{"id":"text-113","heading":"Text","content":"Fi"},{"id":"text-114","heading":"Text","content":"si [ ! -r . ]"},{"id":"text-115","heading":"Text","content":"# routine pour la connectivité ping inet"},{"id":"text-116","heading":"Text","content":"check_connection ()"},{"id":"text-117","heading":"Text","content":"si [ $IGNORE_OFFLINE -eq 1 ]; ensuite"},{"id":"text-118","heading":"Text","content":"echo &quot;WARN: la vérification de la connectivité Internet est désactivée&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-119","heading":"Text","content":"echo &quot;Sauter la vérification de la connectivité Internet&quot;"},{"id":"text-120","heading":"Text","content":"autre"},{"id":"text-121","heading":"Text","content":"si ping -c 1 8.8.8.8 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite"},{"id":"text-122","heading":"Text","content":"echo &quot;INFO: Ping to Google DNS réussi&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-123","heading":"Text","content":"echo &quot;Ping to Google DNS réussie&quot;"},{"id":"text-124","heading":"Text","content":"autre"},{"id":"text-125","heading":"Text","content":"echo &quot;ERREUR: échec de la commande ping vers Google DNS. Pas d&#39;accès à Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-126","heading":"Text","content":"echo &quot;Echec de la commande ping vers Google DNS. Pas d&#39;accès Internet?&quot;"},{"id":"text-127","heading":"Text","content":"Fi"},{"id":"text-128","heading":"Text","content":"si ping -c 1 4.2.2.1 &gt;&gt; / dev / null 2&gt; &amp; 1; ensuite"},{"id":"text-129","heading":"Text","content":"echo &quot;INFO: Ping to L4 successfull&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-130","heading":"Text","content":"echo &quot;Ping to L4 successfull&quot;"},{"id":"text-131","heading":"Text","content":"autre"},{"id":"text-132","heading":"Text","content":"echo &quot;ERREUR: Echec de la requête Ping to L4. Pas d&#39;accès Internet?&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-133","heading":"Text","content":"echo &quot;Ping to L4 a échoué. Pas d&#39;accès à Internet?&quot;"},{"id":"text-134","heading":"Text","content":"sortie 0"},{"id":"text-135","heading":"Text","content":"Fi"},{"id":"text-136","heading":"Text","content":"Fi"},{"id":"text-137","heading":"Text","content":"# routine pour s&#39;assurer que les fichiers binaires nécessaires sont trouvés"},{"id":"text-138","heading":"Text","content":"check_binaries ()"},{"id":"text-139","heading":"Text","content":"si [ ! -f $FORGE_JAR ] ; ensuite"},{"id":"text-140","heading":"Text","content":"echo &quot;WARN: $ FORGE_JAR introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-141","heading":"Text","content":"echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;"},{"id":"text-142","heading":"Text","content":"install_server"},{"id":"text-143","heading":"Text","content":"Fi"},{"id":"text-144","heading":"Text","content":"si [ ! -f ./minecraft_server.$MCVER.jar ] ; ensuite"},{"id":"text-145","heading":"Text","content":"echo &quot;WARN: minecraft_server. $ MCVER .jar non trouvé&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-146","heading":"Text","content":"echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;"},{"id":"text-147","heading":"Text","content":"install_server"},{"id":"text-148","heading":"Text","content":"Fi"},{"id":"text-149","heading":"Text","content":"si [ ! -d ./libraries ] ; ensuite"},{"id":"text-150","heading":"Text","content":"echo &quot;WARN: répertoire de la bibliothèque introuvable&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-151","heading":"Text","content":"echo &quot;Fichiers requis non trouvés, vous devez installer Forge&quot;"},{"id":"text-152","heading":"Text","content":"install_server"},{"id":"text-153","heading":"Text","content":"Fi"},{"id":"text-154","heading":"Text","content":"# Le script / le lot commence ici &#8230;"},{"id":"text-155","heading":"Text","content":"# fichier journal init et informations de base de vidage"},{"id":"text-156","heading":"Text","content":"echo &quot;INFO: le script de démarrage à&quot; $ (date -u +% Y-% m-% d_% H:% M:% S)&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-157","heading":"Text","content":"echo &quot;DEBUG: Dumping des variables de départ:&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-158","heading":"Text","content":"echo &quot;DEBUG: MAX_RAM = $ MAX_RAM&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-159","heading":"Text","content":"echo &quot;DEBUG: FORGE_JAR = $ FORGE_JAR&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-160","heading":"Text","content":"echo &quot;DEBUG: JAVA_ARGS = $ JAVA_ARGS&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-161","heading":"Text","content":"echo &quot;DEBUG: CRASH_COUNT = $ CRASH_COUNT&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-162","heading":"Text","content":"echo &quot;DEBUG: RUN_FROM_BAD_FOLDER = $ RUN_FROM_BAD_FOLDER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-163","heading":"Text","content":"echo &quot;DEBUG: IGNORE_OFFLINE = $ IGNORE_OFFLINE&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-164","heading":"Text","content":"echo &quot;DEBUG: MCVER = $ MCVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-165","heading":"Text","content":"echo &quot;DEBUG: FORGEVER = $ FORGEVER&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-166","heading":"Text","content":"echo &quot;DEBUG: FORGEURL = $ FORGEURL&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-167","heading":"Text","content":"echo &quot;DEBUG: Informations système de base:&quot; $ (uname -a) &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-168","heading":"Text","content":"echo &quot;DEBUG: Estimation de la RAM totale:&quot; $ (getconf -a | grep PAGES | awk &#39;BEGIN total = 1 if (NR == 1  FIN print total / 1024/1024 &quot;MB&quot; &#39;) &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-169","heading":"Text","content":"echo &quot;DEBUG: Informations sur la version de Java:&quot; $ (version java) &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-170","heading":"Text","content":"echo &quot;DEBUG: Vider la liste du répertoire courant&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-171","heading":"Text","content":"ls -s1h &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-172","heading":"Text","content":"exportation réponse = &quot;n&quot;"},{"id":"text-173","heading":"Text","content":"écho &quot;&quot;"},{"id":"text-174","heading":"Text","content":"read -t 6 -p &quot;Sur le point de démarrer le serveur. Forcer la réinstallation (y / n)?&quot;"},{"id":"text-175","heading":"Text","content":"si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite"},{"id":"text-176","heading":"Text","content":"echo &quot;INFO: l&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-177","heading":"Text","content":"echo &quot;L&#39;utilisateur a choisi de réinstaller manuellement les fichiers du serveur&quot;"},{"id":"text-178","heading":"Text","content":"install_server"},{"id":"text-179","heading":"Text","content":"Fi"},{"id":"text-180","heading":"Text","content":"check_dir"},{"id":"text-181","heading":"Text","content":"check_connection"},{"id":"text-182","heading":"Text","content":"check_binaries"},{"id":"text-183","heading":"Text","content":"# boucle pour redémarrer le serveur et vérifier la fréquence des plantages"},{"id":"text-184","heading":"Text","content":"a = 0"},{"id":"text-185","heading":"Text","content":"last_crash = $ ((SECONDS))"},{"id":"text-186","heading":"Text","content":"bien que vrai faire"},{"id":"text-187","heading":"Text","content":"start_server"},{"id":"text-188","heading":"Text","content":"b = $?"},{"id":"text-189","heading":"Text","content":"si [ « $b » -eq « 0 » ]; ensuite"},{"id":"text-190","heading":"Text","content":"a = 0"},{"id":"text-191","heading":"Text","content":"autre"},{"id":"text-192","heading":"Text","content":"maintenant = $ ((SECONDES))"},{"id":"text-193","heading":"Text","content":"diff = $ (($ now- $ last_crash))"},{"id":"text-194","heading":"Text","content":"si [ « $diff » -gt « 3600 » ]; ensuite"},{"id":"text-195","heading":"Text","content":"a = 1"},{"id":"text-196","heading":"Text","content":"autre"},{"id":"text-197","heading":"Text","content":"a = $ ((a + 1))"},{"id":"text-198","heading":"Text","content":"Fi"},{"id":"text-199","heading":"Text","content":"last_crash = $ ((SECONDS))"},{"id":"text-200","heading":"Text","content":"Fi"},{"id":"text-201","heading":"Text","content":"si [ « $a » -eq $CRASH_COUNT ]; ensuite"},{"id":"text-202","heading":"Text","content":"echo &quot;Le serveur a planté plusieurs fois&quot;"},{"id":"text-203","heading":"Text","content":"echo &quot;ERREUR: le serveur a échoué et trop de démarrages successifs.&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-204","heading":"Text","content":"sortie 0"},{"id":"text-205","heading":"Text","content":"Fi"},{"id":"text-206","heading":"Text","content":"exportation réponse = &quot;y&quot;"},{"id":"text-207","heading":"Text","content":"echo &quot;Le serveur va redémarrer dans environ 10 secondes. Aucune entrée requise &#8230;&quot;"},{"id":"text-208","heading":"Text","content":"read -t 12 -p &quot;Redémarrer maintenant (y) ou sortir du shell (n)?&quot; réponse"},{"id":"text-209","heading":"Text","content":"si [[ « $answer » =~ ^([yY][eE][sS]|[yY]) + $]]; ensuite"},{"id":"text-210","heading":"Text","content":"echo &quot;INFO: l&#39;utilisateur a annulé le redémarrage; quitter le shell&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-211","heading":"Text","content":"sortie 0"},{"id":"text-212","heading":"Text","content":"Fi"},{"id":"text-213","heading":"Text","content":"# re-valider les choses à chaque redémarrage du serveur"},{"id":"text-214","heading":"Text","content":"check_dir"},{"id":"text-215","heading":"Text","content":"check_connection"},{"id":"text-216","heading":"Text","content":"check_binaries"},{"id":"text-217","heading":"Text","content":"echo &quot;INFO: le serveur redémarre automatiquement à partir de&quot; &gt;&gt; serverstart.log 2&gt; &amp; 1"},{"id":"text-218","heading":"Text","content":"echo &quot;Redémarrage maintenant!&quot;"},{"id":"text-219","heading":"Text","content":"terminé"},{"id":"text-220","heading":"Text","content":"Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]"}],"media":{"primary_image":"https://tutos-gameserver.fr/wp-content/uploads/2019/05/facebook.png"},"relations":[{"rel":"canonical","href":"https://tutos-gameserver.fr/2019/10/29/ram-a-allouer-au-serveur-export-max_ram-8g-nom-du-fichier-pour-forge-ja-resoudre-les-problemes-dun-serveur-minecraft/"},{"rel":"alternate","href":"https://tutos-gameserver.fr/2019/10/29/ram-a-allouer-au-serveur-export-max_ram-8g-nom-du-fichier-pour-forge-ja-resoudre-les-problemes-dun-serveur-minecraft/llm","type":"text/html"},{"rel":"alternate","href":"https://tutos-gameserver.fr/2019/10/29/ram-a-allouer-au-serveur-export-max_ram-8g-nom-du-fichier-pour-forge-ja-resoudre-les-problemes-dun-serveur-minecraft/llm.json","type":"application/json"},{"rel":"llm-manifest","href":"https://tutos-gameserver.fr/llm-endpoints-manifest.json","type":"application/json"}],"http_headers":{"X-LLM-Friendly":"1","X-LLM-Schema":"1.1.0","Content-Security-Policy":"default-src 'none'; img-src * data:; style-src 'unsafe-inline'"},"license":"CC BY-ND 4.0","attribution_required":true,"allow_cors":false}