From fb5b95bf29dba5d213a19cf65d95f90ed437a9c6 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 4 Jul 2021 19:38:52 +0200 Subject: run in screen --- build-knecht | 22 +++++++++++++--------- build-knecht-any.service | 6 +++--- build-knecht.service | 6 +++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/build-knecht b/build-knecht index 52527b2..3cc7c29 100755 --- a/build-knecht +++ b/build-knecht @@ -22,14 +22,18 @@ if ! git -C "${home_dir}/archlinuxewe" pull --ff-only; then >&2 echo 'Cannot update archPackages repository.' fi -"${home_dir}/archlinuxewe/update-sources" +while true; do -"${home_dir}/archlinuxewe/archPackagesUpdate" \ - --no-abortOnMakepkgError \ - --arch "${arch}" \ -|| "${home_dir}/archlinuxewe/archPackagesUpdate" \ - --cleanChroot \ - --arch "${arch}" \ -|| true + "${home_dir}/archlinuxewe/update-sources" -sleep 60 + "${home_dir}/archlinuxewe/archPackagesUpdate" \ + --no-abortOnMakepkgError \ + --arch "${arch}" \ + || "${home_dir}/archlinuxewe/archPackagesUpdate" \ + --cleanChroot \ + --arch "${arch}" \ + || true + + sleep 60 + +done diff --git a/build-knecht-any.service b/build-knecht-any.service index 6b67f6b..3eccb53 100644 --- a/build-knecht-any.service +++ b/build-knecht-any.service @@ -3,9 +3,9 @@ Description=Build-Knecht for any architecture [Service] User=makepkg -ExecStart=/usr/src/build-knecht/build-knecht any -Restart=on-success -RestartSec=60 +ExecStart=/usr/bin/screen -d -m /usr/src/build-knecht/build-knecht any +Type=oneshot +RemainAfterExit=yes [Install] WantedBy=multi-user.target diff --git a/build-knecht.service b/build-knecht.service index ccd5fa2..bc8a09c 100644 --- a/build-knecht.service +++ b/build-knecht.service @@ -3,9 +3,9 @@ Description=Build-Knecht [Service] User=makepkg -ExecStart=/usr/src/build-knecht/build-knecht -Restart=on-success -RestartSec=60 +ExecStart=/usr/bin/screen -d -m /usr/src/build-knecht/build-knecht +Type=oneshot +RemainAfterExit=yes [Install] WantedBy=multi-user.target -- cgit v1.2.3-70-g09d2