This repository was archived by the owner on Feb 26, 2025. It is now read-only.
forked from technotiger/CashReaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·80 lines (63 loc) · 2.99 KB
/
run.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ -f $SCRIPT_DIR/settings.conf ]
then
source $SCRIPT_DIR/settings.conf
else
echo Could not find settings.conf, exiting...
exit 1
fi
clear
echo "--------------------------------------------------------------------------------
_ _ ___ _ ___ __ __ __ ___ _____ __
| | | | | __| | | / _/ /__\ | V | | __| |_ _| /__\
| 'V' | | _| | |_ | \__ | \/ | | \_/ | | _| | | | \/ |
!_/ \_! |___| |___| \__/ \__/ |_| |_| |___| |_| \__/
▄███ ▄███ ▄██ ▄█ █▄ ▄██▄ ▄███▄ ▄███ ▄██▄ ▄███▄ ▄██▄
█ █ █ █ █ ▀ █ █ █ █ █ █ █ █ █ █ █ █ █ █
█ █▀ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
█ █ █ ▀█▄ ▄█▄▄▄█▄ ▄█▄▄▀ ▄█▄▄▄ █ █ █ █ ▄█▄▄▄ ▄█▄▄▀
█ ▀█████ █ ▀██▀▀█▀ ▀██▄ ▀█▀▀ ▀█████ ███▀ ▀█▀▀ ▀██▄
█ ▄ █ █ █ █ █ █ █ █ ▄▄ █ █ █ █ ▄▄ █ █
███▀ ▄█ █ ▄██▀ ▄█ █▄ ▄█ █ ████▀ ▄█ █ █ ████▀ ▄█ █
--------------------------------------------------------------------------------"
echo "
Please read the README file before proceeding.
To support this project, please consider using the provided links to create the required accounts.
Have you updated the settings.conf file with your login credentials? (yes/no)"
read answer
if [ "$answer" = "yes" ]; then
echo "
Thank you for the confirmation.
"
else
echo "
Please edit the settings.conf file and run this script again.
"
exit 0
fi
echo -e "Building docker image... This process can take several minutes, please be patient.\n |-"
indent_output() {
sed 's/^/ |-/'
}
{
docker pull -q honeygain/honeygain:latest
cd $SCRIPT_DIR
docker build . -t walofz/cashreaper:latest
} | indent_output
echo -e "Image built. Cleaning up...\n |-"
{
docker image rm honeygain/honeygain:latest
docker image prune -f
} | indent_output
echo -e "Starting Container\n |-"
{
docker run -d --restart unless-stopped --tmpfs /tmp:exec --tmpfs /run:exec --tmpfs /root/.bitpingd:exec --mount source=vol-cashreaper,target=/etc/earnapp --env-file ${SCRIPT_DIR}/settings.conf --name cashreaper walofz/cashreaper:latest
} | indent_output
if [[ "$USE_EARNAPP" == "y" ]]
then
echo Waiting for 30 sec for the container to start up, will print the earnapp link when done
sleep 30
echo Use this link to register your worker
docker exec -it cashreaper earnapp register | grep -Eo 'https.+'
fi