diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-09-14 21:31:03 -0600 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-15 09:37:44 +0300 |
commit | f03c9e3ab64eedcb5fa95275a110190d1031b319 (patch) | |
tree | c3050847d9cf834047be86a786736fcec48df720 /app-admin | |
parent | app-admin/pprocm: update EAPI 6 -> 8 (diff) | |
download | gentoo-f03c9e3ab64eedcb5fa95275a110190d1031b319.tar.gz gentoo-f03c9e3ab64eedcb5fa95275a110190d1031b319.tar.bz2 gentoo-f03c9e3ab64eedcb5fa95275a110190d1031b319.zip |
app-admin/restart-services: update EAPI 6 -> 8
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/restart-services/restart-services-0.17.0-r1.ebuild | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/app-admin/restart-services/restart-services-0.17.0-r1.ebuild b/app-admin/restart-services/restart-services-0.17.0-r1.ebuild new file mode 100644 index 000000000000..7baedbc6e948 --- /dev/null +++ b/app-admin/restart-services/restart-services-0.17.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Tool to manage OpenRC and systemd services that need to be restarted" +HOMEPAGE="https://dev.gentoo.org/~mschiff/restart-services/" +SRC_URI="https://dev.gentoo.org/~mschiff/src/${PN}/${P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND=" + app-admin/lib_users + app-portage/portage-utils + || ( sys-apps/openrc sys-apps/systemd ) +" + +src_install() { + dosbin restart-services + doman restart-services.1 + keepdir /etc/restart-services.d + insinto /etc + doins restart-services.conf + dodoc README CHANGES + + sed -i -e 's/^#include/include/' "${ED}"/etc/restart-services.conf || die + cat > "${ED}"/etc/restart-services.d/00-local.conf <<- EOF || die + # You may put your local changes here or in any other *.conf file + # in this directory so you can leave /etc/restart-services.conf as is. + # Example: + # *extend* SV_ALWAYS to match 'myservice' + # SV_ALWAYS+=( myservice ) + EOF +} + +pkg_postinst() { + # migrate config data for versions < 0.13.2 + if [[ -n ${REPLACING_VERSIONS} ]]; then + + if [[ $(ver_cut 1 ${REPLACING_VERSIONS}) -eq 0 ]] \ + && [[ $(ver_cut 2 ${REPLACING_VERSIONS}) -lt 14 ]]; then + local have_old_config=0 + ebegin "Checking for old config" + if [[ -f /etc/restart_services.conf ]]; then + have_old_config=1 + ewarn "Old config file found: /etc/restart_services.conf" + ewarn "It will be ignored so please migrate settings to a file in" + ewarn "/etc/restart-services.d/ and/or remove /etc/restart_services.conf" + fi + if [[ -d /etc/restart_services.d ]]; then + have_old_config=1 + ewarn "Old config directory found: /etc/restart_services.d" + ewarn "It will be ignored so please migrate files to /etc/restart-services.d" + ewarn "and/or remove /etc/restart_services.d" + fi + eend ${have_old_config} + fi + fi +} |