Coder Social home page Coder Social logo

mcbe-setup-tools's Introduction

はじめに

MCscripts導入済みのサーバーへworldデータをアップロード/ダウンロードするツール

想定環境

MCscriptsのインストールがすでに完了しているサーバー
以下2つどちらも実行前に[email protected]は停止しておいてください。

world_to_server.yml

概要

ローカルのworldデータのzipをMCscriptsを導入済みのサーバーのworldデータのディレクトリにアップロードするansible playbook

対象サーバーへは.ssh/configで設定済みで、HostNameでsshできること、またsudoでパスワードは要求されない状態であることを想定。そうでない場合はplaybookの変更や実行コマンドの変更が必要。

設定項目

  1. MCscriptsで複数サーバーを立ち上げるなどして、サービス名が[email protected]以外になっている場合は、varsのserver_argをMCBEから変えてください。
  2. zip_fileはアップロードするzipファイルのパスに書き換えてください。
  3. backupがtrueなら現在のサーバー上のworldデータ(~mc/bedrock/MCBE/worlds/Bedrock level)を削除する前に[email protected]でバックアップを実行する。falseならバックアップしない。

実行

ansible-playbook world_to_server.yml

world_to_local.sh

設定項目

MCscriptsで複数サーバーを立ち上げるなどして、サービス名が[email protected]以外になっている場合は、スクリプト最初のserver_argをMCBEから変えてください。
対象サーバーへは.ssh/configで設定済みで、HostNameでsshできることが前提。

実行

bash world_to_local.sh (.ssh/configで設定したHostName)

共通項目

以上でアップロード及びダウンロードされるzipファイルは、linuxのunzipコマンドで解凍すると、Bedlock levelのディレクトリが同じ階層にできるような階層構造です。

以下解凍イメージ

xxxxxx@DESKTOP-BUNMQ23:~/mcbe-setup-tools/downloads$ ls
 202206152136.zip
xxxxxx@DESKTOP-BUNMQ23:~/mcbe-setup-tools/downloads$ unzip 202206152136.zip 
Archive:  202206152136.zip
   creating: Bedrock level/
   creating: Bedrock level/db/
(省略)
xxxxxx@DESKTOP-BUNMQ23:~/mcbe-setup-tools/downloads$ ls
 202206152136.zip  'Bedrock level'

その他

元々インストールスクリプトなどを含んでいましたが、MCscriptsのインストールスクリプトが整備されたので削除しました。

mcbe-setup-tools's People

Contributors

nanabach-darkserver avatar tapewerm avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tapewerm

mcbe-setup-tools's Issues

I moved some MCscripts files

MCscripts has a new directory named /opt/MCscripts. I moved Bash script SH files, the backup_dir symlink, and the .mcbe_log directory to there. I did this because /opt/MCscripts is owned by root and read only for the mc user. It's good security practice to limit the mc user's permissions on script files root executes and config files for those scripts. If you have any questions let me know. Sorry for the inconvenience.

TapeWerm/MCscripts@118e191...8460724 shows the user facing changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.