From befbf3b43fab184d5014cc51fcc6c3c1f0a4cd53 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Sat, 29 Oct 2022 02:25:18 +0800 Subject: feat(script): Optimize build fail output feat(script): Add update-repo-copy.service Signed-off-by: KunoiSayami --- utils/systemd/update-repo-copy.service | 8 ++++++++ utils/systemd/wait-services.sh | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 utils/systemd/update-repo-copy.service create mode 100755 utils/systemd/wait-services.sh (limited to 'utils/systemd') diff --git a/utils/systemd/update-repo-copy.service b/utils/systemd/update-repo-copy.service new file mode 100644 index 0000000..af79ee5 --- /dev/null +++ b/utils/systemd/update-repo-copy.service @@ -0,0 +1,8 @@ +[Unit] +Description=Update repo copy service +After=update-repo@.service + +[Service] +WorkingDirectory=/var/lib/update/packages/ +ExecStartPre=/var/lib/update/wait-services.sh +ExecStart=/usr/bin/rsync -r --links -vct --update --delete . /var/www/packages \ No newline at end of file diff --git a/utils/systemd/wait-services.sh b/utils/systemd/wait-services.sh new file mode 100755 index 0000000..be20239 --- /dev/null +++ b/utils/systemd/wait-services.sh @@ -0,0 +1,6 @@ +#!/bin/bash +echo "Checking is service running" +while /usr/bin/systemctl status --no-page | grep update-repo@ | grep -v grep; +do + sleep 1 +done \ No newline at end of file -- cgit v1.3.1