From 5b2ea082911629049a956683863f14bc2ce60bd4 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Tue, 27 Feb 2024 02:06:16 +0100 Subject: [PATCH] Go another way around... Signed-off-by: Vitalii Koshura --- .github/workflows/debrepo/package_prepare.sh | 8 +++++--- .github/workflows/linux-package.yml | 3 +++ packages/deb/postinst | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debrepo/package_prepare.sh b/.github/workflows/debrepo/package_prepare.sh index 972997f0dd0..efc22b7ae2c 100755 --- a/.github/workflows/debrepo/package_prepare.sh +++ b/.github/workflows/debrepo/package_prepare.sh @@ -35,7 +35,9 @@ function prepare_client() { # prepare dir structure mkdir -p usr/local/bin exit_on_fail - mkdir -p etc/boinc-client etc/init.d + mkdir -p etc/boinc-client etc/default etc/init.d + exit_on_fail + mkdir -p usr/lib/systemd/system exit_on_fail mkdir -p var/lib/boinc exit_on_fail @@ -53,9 +55,9 @@ function prepare_client() { exit_on_fail mv boinc boinccmd usr/local/bin/ exit_on_fail - mv boinc-client.service DEBIAN/ + mv boinc-client.service usr/lib/systemd/system/ exit_on_fail - mv boinc-client.conf DEBIAN/boinc-client.default + mv boinc-client.conf etc/default/boinc-client exit_on_fail mv boinc-client etc/init.d/ exit_on_fail diff --git a/.github/workflows/linux-package.yml b/.github/workflows/linux-package.yml index ab1f4b2a094..663076076db 100644 --- a/.github/workflows/linux-package.yml +++ b/.github/workflows/linux-package.yml @@ -478,6 +478,9 @@ jobs: set_perm ${BOINCDIR}/slots ${BOINCUSER} ${BOINCGROUP} 0775 update_nested_dirs ${BOINCDIR}/slots u+x,g+x,o+x fi + if [ -x /bin/systemctl ] ; then + systemctl enable --now boinc-client.service + fi %files ${PKG_FILELIST} diff --git a/packages/deb/postinst b/packages/deb/postinst index e5a3dd8215c..f9e43abeabd 100755 --- a/packages/deb/postinst +++ b/packages/deb/postinst @@ -150,3 +150,7 @@ if [ -d ${BOINCDIR}/slots ] ; then set_perm ${BOINCDIR}/slots ${BOINCUSER} ${BOINCGROUP} 0775 update_nested_dirs ${BOINCDIR}/slots u+x,g+x,o+x fi + +if [ -x /bin/systemctl ] ; then + systemctl enable --now boinc-client.service +fi