Improvements and bug fixes
This commit is contained in:
parent
cf5e2fb26d
commit
79fe5aac39
|
@ -1,7 +1,7 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:mainline-alpine
|
||||
image: nginx
|
||||
container_name: nginx
|
||||
hostname: ${DOMAIN_NAME:?err}
|
||||
volumes:
|
||||
|
@ -37,11 +37,11 @@ services:
|
|||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
trap exit TERM;
|
||||
trap exit TERM INT;
|
||||
sleep 10;
|
||||
while :; do
|
||||
apikey="$(grep -oPm 1 '(?<=\<apikey\>).*(?=\</apikey\>)' /data/syncthing/config.xml)"
|
||||
curl -s -X POST -H "X-API-Key: $$apikey" http://syncthing:8384/rest/db/revert?folder=jhcrt-m2dra;
|
||||
apikey="$$(grep -oPm 1 '(?<=\<apikey\>).*(?=\</apikey\>)' /data/syncthing/config.xml)"
|
||||
curl -s --fail -X POST -H "X-API-Key: $$apikey" http://syncthing:8384/rest/db/revert?folder=jhcrt-m2dra || echo Failed to revert folder;
|
||||
sed -i -r '/<device id="ZDHVMSP-EW4TMWX-DBH2W4P-HV5A6OY-BBEFABO-QTENANJ-RJ6GKNX-6KCG7QY"/! s|(^ *<device .*id="[^"]+".*skipIntroductionRemovals="false".*introducedBy=")(">)|\1ZDHVMSP-EW4TMWX-DBH2W4P-HV5A6OY-BBEFABO-QTENANJ-RJ6GKNX-6KCG7QY\2|' /data/syncthing/config.xml
|
||||
sleep 1h &
|
||||
wait $${!};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:mainline-alpine
|
||||
image: nginx
|
||||
container_name: nginx
|
||||
hostname: ${DOMAIN_NAME:?err}
|
||||
volumes:
|
||||
|
@ -46,11 +46,11 @@ services:
|
|||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
trap exit TERM;
|
||||
trap exit TERM INT;
|
||||
sleep 10;
|
||||
while :; do
|
||||
apikey="$(grep -oPm 1 '(?<=\<apikey\>).*(?=\</apikey\>)' /data/syncthing/config.xml)"
|
||||
curl -s -X POST -H "X-API-Key: $$apikey" http://syncthing:8384/rest/db/revert?folder=jhcrt-m2dra;
|
||||
apikey="$$(grep -oPm 1 '(?<=\<apikey\>).*(?=\</apikey\>)' /data/syncthing/config.xml)"
|
||||
curl -s --fail -X POST -H "X-API-Key: $$apikey" http://syncthing:8384/rest/db/revert?folder=jhcrt-m2dra || echo Failed to revert folder;
|
||||
sed -i -r '/<device id="ZDHVMSP-EW4TMWX-DBH2W4P-HV5A6OY-BBEFABO-QTENANJ-RJ6GKNX-6KCG7QY"/! s|(^ *<device .*id="[^"]+".*skipIntroductionRemovals="false".*introducedBy=")(">)|\1ZDHVMSP-EW4TMWX-DBH2W4P-HV5A6OY-BBEFABO-QTENANJ-RJ6GKNX-6KCG7QY\2|' /data/syncthing/config.xml
|
||||
sleep 1h &
|
||||
wait $${!};
|
||||
|
|
6
update
6
update
|
@ -18,8 +18,12 @@ if [ ! -d "./.git" ]; then
|
|||
git remote add origin https://github.com/chaotic-aur/docker-mirror
|
||||
git fetch
|
||||
git reset --hard origin/main
|
||||
else if [ ! -f ./custom.diff ]; then
|
||||
git pull || { echo "Git pull failed, please fix the issue at hand."; exit 1; }
|
||||
else
|
||||
git pull || echo "Git pull failed, please fix the issue at hand."
|
||||
git fetch
|
||||
git reset --hard origin/main
|
||||
git apply ./custom.diff
|
||||
fi
|
||||
|
||||
if [ "$SELFUPDATE" != 1 ]; then
|
||||
|
|
Loading…
Reference in New Issue