diff options
author | Marc Schiffbauer <mschiff@gentoo.org> | 2019-02-24 13:00:15 +0100 |
---|---|---|
committer | Marc Schiffbauer <mschiff@gentoo.org> | 2019-02-24 13:00:15 +0100 |
commit | ff04eb01894f92627b986debfc3d604006751552 (patch) | |
tree | 801f9a7f3ae93f31c45df549ed1841b4d2d576c0 | |
parent | net-ftp/vsftpd: Drop old (diff) | |
download | gentoo-ff04eb01894f92627b986debfc3d604006751552.tar.gz gentoo-ff04eb01894f92627b986debfc3d604006751552.tar.bz2 gentoo-ff04eb01894f92627b986debfc3d604006751552.zip |
app-admin/restart-services: recover only stable version
I removed (cleaned) the only stable version by accident.
This commit recovers it.
Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
-rw-r--r-- | app-admin/restart-services/Manifest | 1 | ||||
-rw-r--r-- | app-admin/restart-services/restart-services-0.14.1.ebuild | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/app-admin/restart-services/Manifest b/app-admin/restart-services/Manifest index 77788c432ed1..db3f27811980 100644 --- a/app-admin/restart-services/Manifest +++ b/app-admin/restart-services/Manifest @@ -1,2 +1,3 @@ +DIST restart-services-0.14.1.tgz 20909 BLAKE2B 2f6b74fc6094be83e1872d2a6ca7abb02a49b5db65d81cd37f8161bac148e5fe0614502f1f06356ff9cd6c6ba03c416dae1eec3a86f48dc011bc6e28c1b076e3 SHA512 3434c4b6cdf9d02b035eba2cc67cebe8e06a2cf31c2d8627063b84224dcb6d44e276e1fcb82221ad77ab7ee7e16fa7ee58fb94b7849d40e6786d3fcfb6087866 DIST restart-services-0.14.2.tgz 21227 BLAKE2B 9a3f03bbd1995df6f583f8c4228914f098922828b1407c0c8069908ebdbef67599a8a7421b0c404adf2d330632ae83646300a965c514f6746bbd95674ab102ea SHA512 487e8d0a448954be7b79d1c95bffd00d5f875ccb908b8004e18e45752e593fe57713f97c0749e28367bf7606c5cf46556f31de6b018a151f7cd384c88277ca7c DIST restart-services-0.14.3.tgz 21377 BLAKE2B f99331d66f174a68134722bf00b854d68f2b1deb492c6c6db0f17974dc14b28df1ce3a8669fe42a5085f64216e19003c02e364dcd1a75428060c9ef7ba176f86 SHA512 9c4b9d68db303548957b533edba58635a7bb97149f0cc2e1e270b399c860ff0b42a257a61d9c9b0d45c1704241d0cefda72e7411b9c29f9f80cf159b37908eb1 diff --git a/app-admin/restart-services/restart-services-0.14.1.ebuild b/app-admin/restart-services/restart-services-0.14.1.ebuild new file mode 100644 index 000000000000..d83a7fafc540 --- /dev/null +++ b/app-admin/restart-services/restart-services-0.14.1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Tool to manage OpenRC 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 x86" +IUSE="" + +DEPEND="" +RDEPEND=" + app-admin/lib_users + sys-apps/openrc +" + +src_install() { + dosbin restart-services + doman restart-services.1 + keepdir /etc/restart-services.d + insinto /etc + doins restart-services.conf + dodoc README CHANGES + + # remove after 2018/07/01 + dosym restart-services /usr/sbin/restart_services + + sed -i 's/^#include/include/' "${D}"/etc/restart-services.conf + cat>"${D}"/etc/restart-services.d/00-local.conf<<-EOF + # 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() { + local MAJOR MINOR + # migrate config data for versions < 0.13.2 + if [[ $REPLACING_VERSIONS ]]; then + MAJOR=${REPLACING_VERSIONS%%.*} + MINOR=${REPLACING_VERSIONS%.*} + MINOR=${MINOR#*.} + + if [[ $MAJOR -eq 0 && $MINOR -lt 14 ]]; then + einfo "Migrating config" + if [[ -e /etc/restart-services.d ]]; then + ewarn "/etc/restart-services.d already exists?!" + return + fi + if [[ -e /etc/restart-services.conf ]]; then + ewarn "/etc/restart-services.conf already exists?!" + return + fi + + if [[ -f /etc/restart_services.d/00-local.conf ]]; then + sed -i 's/restart_services/restart-services/g' \ + /etc/restart_services.d/00-local.conf + fi + if [[ $(ls /etc/restart_services.d/) ]]; then + mv -v /etc/restart_services.d/* /etc/restart-services.d/ + fi + if [[ -f /etc/restart_services.d/.keep_app-admin_restart_services-0 ]]; then + rm -v /etc/restart_services.d/.keep_app-admin_restart_services-0 + fi + if [[ -d /etc/restart_services.d ]]; then + rmdir -v /etc/restart_services.d + fi + + if [[ -f /etc/restart_services.conf ]]; then + sed -i 's/restart_services/restart-services/g' \ + /etc/restart_services.conf + mv /etc/restart_services.conf /etc/restart-services.conf + fi + einfo "done" + fi + fi +} |