added better qortal stop options
This commit is contained in:
parent
d5ea39dae9
commit
d5394e0e3a
@ -50,7 +50,13 @@ esac
|
|||||||
echo -e "${CYAN}⬇️ Downloading Qortal Core...${NC}"
|
echo -e "${CYAN}⬇️ Downloading Qortal Core...${NC}"
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
if [ -d "$HOME/qortal" ]; then
|
if [ -d "$HOME/qortal" ]; then
|
||||||
"${HOME}/qortal/stop.sh"
|
if pgrep -f "qortal.jar" > /dev/null && curl -s "http://localhost:12391/admin/status" | grep -q "uptime"; then
|
||||||
|
if [ -f "${HOME}/qortal/stop.sh" ]; then
|
||||||
|
"${HOME}/qortal/stop.sh"
|
||||||
|
else
|
||||||
|
curl -X POST "http://localhost:12391/admin/stop" -H "X-API-KEY: $(cat ${HOME}/qortal/apikey.txt)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
mkdir -p "$HOME/backups"
|
mkdir -p "$HOME/backups"
|
||||||
echo -e "${YELLOW}⚠️ Existing 'qortal' folder found. Backing it up...${NC}"
|
echo -e "${YELLOW}⚠️ Existing 'qortal' folder found. Backing it up...${NC}"
|
||||||
mv "$HOME/qortal" "$HOME/backups/qortal-$(date +%s)"
|
mv "$HOME/qortal" "$HOME/backups/qortal-$(date +%s)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user