Skip to content

Commit

Permalink
Updated install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftyos committed Dec 6, 2021
1 parent ee49a20 commit af31ec9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
20 changes: 20 additions & 0 deletions scripts/minima_cleanup_v98.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
set -e

echo "Stopping minima service"
systemctl stop minima
echo "Disabling minima service"
systemctl disable minima

echo "Removing old minima service"
rm /etc/systemd/system/minima.service
systemctl daemon-reload
systemctl reset-failed

echo "Removing minima jars and scripts"
rm minima.jar*
rm minima_update.sh*
rm minima_service.sh*

echo "Removing data directory /root/.minima"
rm -rf /root/.minima
2 changes: 1 addition & 1 deletion scripts/minima_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [ ! $PORT ]; then
PORT='9001'
fi

DOWNLOAD_URL="https://github.com/minima-global/Minima/raw/release-0.100/jar/minima.jar"
DOWNLOAD_URL="https://github.com/minima-global/Minima/raw/master/jar/minima.jar"
MINIMA_JAR_NAME="minima.jar"

echo "[+] Downloading minima from: $DOWNLOAD_URL"
Expand Down
8 changes: 4 additions & 4 deletions scripts/minima_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SLEEP=''
RPC=''

print_usage() {
printf "Usage: Setups a new minima service for the specified port, default 9121 \n \t -c REQUIRED connection host and port HOST:PORT \n \t -u flag Use unsecure p2p version with rpc ports active \n \t -x flag enable clean flag \n \t -p minima port to use eg. -p 9121 \n \t -h minima home directory eg -h /home/minima \n \t -a use the p2p alphas \n"
printf "Usage: Setups a new minima service for the specified port"
}

while getopts ':xrsc::p:d:h:' flag; do
Expand Down Expand Up @@ -44,16 +44,16 @@ if ! id -u 9001 > /dev/null 2>&1; then
chown minima:minima $HOME
fi

wget -q -O $HOME"/minima_service.sh" "https://github.com/minima-global/Minima/raw/release-0.100/scripts/minima_service.sh"
wget -q -O $HOME"/minima_service.sh" "https://github.com/minima-global/Minima/raw/master/scripts/minima_service.sh"
chown minima:minima $HOME"/minima_service.sh"
chmod +x $HOME"/minima_service.sh"

CMD="$HOME/minima_service.sh -s $@"
CRONSTRING="#!/bin/sh
$CMD"

echo "$CRONSTRING" > /etc/cron.daily/minima_$PORT
chmod a+x /etc/cron.daily/minima_$PORT
echo "$CRONSTRING" > /etc/cron.weekly/minima_$PORT
chmod a+x /etc/cron.weekly/minima_$PORT

CMD="$HOME/minima_service.sh $@"
/bin/sh -c "$CMD"
Expand Down

0 comments on commit af31ec9

Please sign in to comment.