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 (
  2. PTM upgrade (
  3. PTM deploy presets (

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


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

1. Deploy scripts (

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 (

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 (

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, and 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.


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.


Leave a Reply

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

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

Facebook photo

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

Connecting to %s