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