PT Magic management scripts

I have create a GitHub repository with a number of bash scripts I use to manage PT Magic (PTM) on my VPS running Ubuntu 17.10. PT Magic (PTM), a free add-on for the Profit Trailer (PT) cryptocurrency trading bot.

The repository contains the following scripts:

  1. Deploy script (deploy-scripts.sh)
  2. PTM upgrade (ptm-upgrade.sh)
  3. PTM deploy presets (ptm-deploy-presets.sh)

What the scripts do is described briefly in the following sections. Please refer to the read me file in the repository for more information.

Developing user friendly scripts and writing readable and useful blogs costs time. I hope they are helpful to you and save you time and effort. If you would like to support me feel free leave a tip. Thanks in advance!

BTC: 3CthfcvaF41nzVqPixCYP61Zi4Yu8vAMML

ETH: 0x2e430FC28edB2B9A25190a533B84A461048896Ca

LTC: MEfgTcmH9uZPodakX3o6q8jmdhxMhYtRph

Important

These script are based on my setup of UbuntuProfit Trailer and PT Magic. See my blogs for more information.

1. Deploy scripts (deploy-scripts.sh)

This script deploys the scripts to each PT Magic (PTM) instances, so each instance has the latest versions of the scripts. This means you can use git clone and pull to keep the scripts up to date. When a new version is available, just do a pull to sync and then call this script to deploy it to each PTM instances.

2. PTM upgrade (ptm-upgrade.sh)

Upgrades a PT Magic (PTM) instance to the latest version. It downloads the latest version of PTM from GitHub and installs it to a new directory with existing data and config files. This script must be run from inside the directory of the current PTM instance you wish to upgrade. If the latest version is already installed it will display a warning message and exit.

3. PTM deploy presets (ptm-deploy-presets.sh)

Presets have to be updated under both the PTM _presets directory and the PT trading directory. It is very inconvenient to do this manually. This script publishes presets to both directories in one go.

This script takes properties files placed in a specific directory and deploys them to both Profit Trailer (PT) and PT Magic (PTM). To do this safely it stops and restarts PT and PTM. This script must be run from the PTM instance directory. It expectsa subdirectory called ‘_deploy’ that contains the PAIRS.properties, DCA.properties and INDICATOR.properties you wish to deploy. Once the properties files have been copied it will restart PT and PTM. The existing properties files will be backed up to a unique subdirectory under the directory called ‘backup’ just in case a rollback is required.

Summary

These scripts make upgrading PT Magic and deploying presets a breeze. I hope you find them helpful.

Related posts

If you liked this post, you might be interested in the following posts.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s