From 0a4449494b613d2eba562466ab9065b4c1e1c89a Mon Sep 17 00:00:00 2001 From: CeciliaKelley33Mm Date: Sun, 13 Oct 2024 08:38:44 +0700 Subject: [PATCH] a post-install and a post-runtime script --- .github/workflows/runglobal.yml | 6 ++++++ loop.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/runglobal.yml b/.github/workflows/runglobal.yml index 0327670..a1e82e3 100644 --- a/.github/workflows/runglobal.yml +++ b/.github/workflows/runglobal.yml @@ -117,6 +117,12 @@ jobs: sed -i 's*KITENAMEPK*${{ secrets.KITENAME }}*g' ~/.pagekite.rc sed -i 's*KITESECRETPK*${{ secrets.KITESECRET }}*g' ~/.pagekite.rc python pagekite.py & + - name: Run post-install script (if exists) + working-directory: /mnt/globalData/toBackup + run: | + if [ -f postinstall.sh ]; then + . postinstall.sh + fi - name: Run the long-lived process working-directory: /mnt/globalData run: | diff --git a/loop.sh b/loop.sh index 77e645d..286c119 100755 --- a/loop.sh +++ b/loop.sh @@ -83,6 +83,12 @@ check() { if [[ "$IS_GLOBAL" == "true" ]]; then command+="-f \"inputs[oldTailscaleHostname]=$hostname\"" + + cd /mnt/globalData/toBackup + + if [ -f postruntime.sh ]; then + . postruntime.sh + fi cd /mnt/globalData/toBackup/minecraft