Retroactively change minDiskFree to avoid hardlocks of mirrors

This commit is contained in:
TNE 2022-11-26 07:56:25 +01:00
parent 8f000cebfd
commit d23da78b8e
3 changed files with 18 additions and 1 deletions

View File

@ -3,6 +3,7 @@
<filesystemType>basic</filesystemType>
<device id="ZDHVMSP-EW4TMWX-DBH2W4P-HV5A6OY-BBEFABO-QTENANJ-RJ6GKNX-6KCG7QY" introducedBy=""></device>
<order>oldestFirst</order>
<minDiskFree unit="%">1</minDiskFree>
</folder>
<device id="ZDHVMSP-EW4TMWX-DBH2W4P-HV5A6OY-BBEFABO-QTENANJ-RJ6GKNX-6KCG7QY" name="builds.garudalinux.org" compression="metadata" introducer="true" skipIntroductionRemovals="false" introducedBy="">
<address>tcp://builds.garudalinux.org</address>

16
run
View File

@ -53,6 +53,22 @@ if [ ! -e ./data/syncthing/config.xml ]; then
chown -R 1000:1000 ./data/syncthing
fi
gawk -i inplace '/<folder id="jhcrt-m2dra"/ {
begin = 1
}
/<minDiskFree unit="">0<\/minDiskFree>/ {
if (begin) {
print " <minDiskFree unit=\"%\">1</minDiskFree>"
next
} else {
print
}
}
/<\/folder>/ {
begin = 0
}
1' ./data/syncthing/config.xml
if [ "$USE_TUNNELS" != "true" ]; then
docker-compose -f docker-compose.yml up ${COMPOSEFLAGS-"-d"}
else

2
update
View File

@ -10,7 +10,7 @@ fi
./stop
if [ ! -d "./.git" ]; then
if [ "$(git rev-parse --is-inside-work-tree)" == "true" ]; then
if [ "$(git rev-parse --is-inside-work-tree || true)" == "true" ]; then
echo "Please run this script in the main directory"
exit 1
fi