forked from cryptopool-builders/multipool_setup
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap_single.sh
43 lines (35 loc) · 1.16 KB
/
bootstrap_single.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
#########################################################
# Source https://mailinabox.email/ https://github.com/mail-in-a-box/mailinabox
# Updated by cryptopool.builders for crypto use...
# This script is intended to be ran from the multipool installer
#########################################################
if [ -z "${TAG}" ]; then
TAG=v1.93
fi
# Clone the MultiPool repository if it doesn't exist.
if [ ! -d $HOME/multipool/yiimp_single ]; then
echo Downloading MultiPool YiiMP Single Server Installer ${TAG}. . .
git clone \
-b ${TAG} --depth 1 \
https://github.com/Kudaraidee/multipool_yiimp_single \
$HOME/multipool/yiimp_single \
< /dev/null 2> /dev/null
echo
fi
# Change directory to it.
cd $HOME/multipool/yiimp_single
# Update it.
sudo chown -R $USER $HOME/multipool/install/.git/
if [ "${TAG}" != `git describe --tags` ]; then
echo Updating MultiPool YiiMP Single Server Installer to ${TAG} . . .
git fetch --depth 1 --force --prune origin tag ${TAG}
if ! git checkout -q ${TAG}; then
echo "Update failed. Did you modify something in `pwd`?"
exit
fi
echo
fi
# Start setup script.
cd $HOME/multipool/yiimp_single
source start.sh