Skip to content

Commit

Permalink
v6.13
Browse files Browse the repository at this point in the history
+ DietPi-Software | Folding@Home: Adding loops to wait and check for Folding@Home to fully start up respectively stop, which is required to edit the automatically created configuration files.
  • Loading branch information
MichaIng committed Aug 6, 2018
1 parent 231f53b commit 2295173
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -3927,6 +3927,18 @@ _EOF_
debconf-set-selections <<< 'fahclient fahclient/passkey string'

Download_Install 'https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.5/latest.deb'
# - FAHCore needs to fully start up, to check system and prepare configuration.
G_DIETPI-NOTIFY -2 'Wait for Folding@Home to do initial checks and fully start up'
local i=0
while ! pgrep -cif ^/var/lib/fahclient/cores* &> /dev/null
do

(( $i >= 10 )) && G_DIETPI-NOTIFY 1 'Folding@Home failed to fully start up within 10 seconds. Install will continue, but manual configuration might be required.' && break
sleep 1
((i++))

done
(( $i < 10 )) && G_DIETPI-NOTIFY 0 'Folding@Home start up finished'

fi

Expand Down Expand Up @@ -7936,7 +7948,18 @@ _EOF_

Banner_Configuration

l_message='Wait 5 seconds for FAHClient to create configuration file' G_RUN_CMD sleep 5
# FAHClient parent process needs to fully stop, which writes back "/etc/fahclient/config.xml", before we can edit.
G_DIETPI-NOTIFY -2 'Wait for FAHClient to fully stop and write back config file'
local i=0
while pgrep -ci FAHClient &> /dev/null
do

(( $i >= 10 )) && G_DIETPI-NOTIFY 1 'FAHClient failed to fully stop within 10 seconds. Install will continue, but manual configuration might be required.' && break
sleep 1
((i++))

done
(( $i < 10 )) && G_DIETPI-NOTIFY 0 'FAHClient config file ready'

# Allow web access for localhost and local network: IP 192.168.0.100 => allow 192.168.0.0/24
local ip_address="$(sed -n 4p /DietPi/dietpi/.network)"
Expand Down

0 comments on commit 2295173

Please sign in to comment.