From 60a5ba7b6149c8d68d8743aac468bd5ed42554c0 Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Wed, 9 Jun 2021 20:11:41 -0500 Subject: [PATCH] Update installer script --- install.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ readme.md | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..0f83628 --- /dev/null +++ b/install.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +if [ ! $(whoami) = "root" ] +then + echo "Please run this script as root"; + exit 1; +fi + +export url="https://github.com/oitsjustjose/DMSM/releases/download/1.0.0/dmsm" + +if [ ! $(command -v docker) ] +then + echo "docker is not installed. Please install it via https://docs.docker.com/get-docker/" + exit 1 +fi + +echo "Downloading DMSM.." + +if [ $(command -v curl) ] +then + curl -L $url > dmsm; +else + if [ $(command -v wget) ] + then + wget $url dmsm; + else + echo "You don't seem to have curl or wget. Please install one of your choice!" + exit 1 + fi +fi + +echo "Installing DMSM.."; + +chmod +x dmsm; + +if [ -d "/usr/local/bin" ] +then + mv ./dmsm /usr/local/bin/dmsm +else + if [ -d "/usr/bin" ] + then + mv ./dmsm /usr/bin/dmsm + else + echo "/usr/local/bin nor /usr/bin could not be found. Are you on a Unix Device??" + fi +fi + +echo "Installed! Use via dmsm (create|start|stop|restart|delete) SERVERNAME" \ No newline at end of file diff --git a/readme.md b/readme.md index 2c5d2ff..1d9164f 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ DMSM is for **Unix Systems Only**. I have compiled it for macOS (both ARM and x8 ### Requirements -The only requirement for using this is Docker. The application is written in Python but compiled to an executible, so you don't even need Python. All you need is docker, which you can find how to set up [here]https://docs.docker.com/get-docker/). +The only requirement for using this is Docker. The application is written in Python but compiled to an executible, so you don't even need Python. All you need is docker, which you can find how to set up [here](https://docs.docker.com/get-docker/). ### Install