Update auto-fix-qortal.sh
added raspberry-pi-specific modifications to both skip auto-fix-visible setup and add/verify cron entries for pi auto-fix and auto-start.
This commit is contained in:
parent
dab44e3ddb
commit
22e3164f25
@ -54,7 +54,6 @@ echo "${YELLOW} Checking system RAM ... $totalm System RAM ... Configuring syste
|
||||
|
||||
|
||||
|
||||
|
||||
echo "${YELLOW} Checking hash of qortal.jar on liocal machine VS newest released qortal.jar on github ${NC}\n"
|
||||
|
||||
cd ~/qortal
|
||||
@ -115,25 +114,34 @@ else
|
||||
cp ~/qortal/new-scripts/auto-fix-qortal.sh .
|
||||
fi
|
||||
|
||||
if command -v gnome-terminal >/dev/null 2>&1 ; then
|
||||
if command -v raspi-config >/dev/null 2>&1 ; then
|
||||
echo "${YELLOW} Raspberry Pi machine detected, creating pi cron and exiting...${NC}\n"
|
||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-cron
|
||||
crontab auto-fix-cron
|
||||
rm auto-fix-cron
|
||||
exit 1
|
||||
else echo "${YELLOW} Not a Raspberry pi machine, continuing...${NC}\n"
|
||||
|
||||
echo "${YELLOW} Setting up auto-fix-visible on GUI-based system... first, creating new crontab entry without auto-fix-startup... ${NC}\n"
|
||||
sleep 2
|
||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-GUI-cron
|
||||
crontab auto-fix-GUI-cron
|
||||
rm auto-fix-GUI-cron
|
||||
echo "${YELLOW} Setting up new ${NC}\n ${WHITE} 'auto-fix-qortal-GUI.desktop' ${NC}\n ${YELLOW} file for GUI-based machines to run 7 min after startup in a visual fashion. Entry in 'startup' will be called ${NC}\n ${WHITE} 'auto-fix-visible' ${NC}\n"
|
||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-qortal-GUI.desktop
|
||||
mkdir ~/.config/autostart
|
||||
cp auto-fix-qortal-GUI.desktop ~/.config/autostart
|
||||
rm ~/auto-fix-qortal-GUI.desktop
|
||||
echo "${YELLOW} Your machine will now run 'auto-fix-qortal.sh' script in a fashion you can SEE, 7 MIN AFTER YOU REBOOT your machine. The normal 'background' process for auto-fix-qortal will continue as normal.${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else echo "${YELLOW} Non-GUI system detected, skipping 'auto-fix-visible' setup ${NC}\n"
|
||||
if command -v gnome-terminal >/dev/null 2>&1 ; then
|
||||
|
||||
echo "${YELLOW} Setting up auto-fix-visible on GUI-based system... first, creating new crontab entry without auto-fix-startup... ${NC}\n"
|
||||
sleep 2
|
||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-GUI-cron
|
||||
crontab auto-fix-GUI-cron
|
||||
rm auto-fix-GUI-cron
|
||||
echo "${YELLOW} Setting up new ${NC}\n ${WHITE} 'auto-fix-qortal-GUI.desktop' ${NC}\n ${YELLOW} file for GUI-based machines to run 7 min after startup in a visual fashion. Entry in 'startup' will be called ${NC}\n ${WHITE} 'auto-fix-visible' ${NC}\n"
|
||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-qortal-GUI.desktop
|
||||
mkdir ~/.config/autostart
|
||||
cp auto-fix-qortal-GUI.desktop ~/.config/autostart
|
||||
rm ~/auto-fix-qortal-GUI.desktop
|
||||
echo "${YELLOW} Your machine will now run 'auto-fix-qortal.sh' script in a fashion you can SEE, 7 MIN AFTER YOU REBOOT your machine. The normal 'background' process for auto-fix-qortal will continue as normal.${NC}\n"
|
||||
exit 1
|
||||
|
||||
else echo "${YELLOW} Non-GUI system detected, skipping 'auto-fix-visible' setup ${NC}\n"
|
||||
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
exit 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user