forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-admin/restart_services: moved, bumped
- Loading branch information
Showing
7 changed files
with
85 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST restart-services-0.14.0.tgz 20896 BLAKE2B e5f2d425659d81d75d7e030e42b582275595cbf9cd35dc85d8d1656792088b27156a2b5f44959966cc034242e03f20a79df6837a30d426b630410987762c97ab SHA512 20fe1750682bdd1e1566b60e80bd099351ae2ff49fb74f138879a7035078dd9b2ddfd79f6c16c3822f8e7eb702d4ab98719e7ca79a3e007b8b547243f9d1a364 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
error "/etc/restart-services.d alrayd exists?!" | ||
die | ||
fi | ||
if [[ -e /etc/restart-services.conf ]]; then | ||
error "/etc/restart-services.conf alrayd exists?!" | ||
die | ||
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 | ||
} |
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
app-admin/restart_services/restart_services-0.13.0-r1.ebuild
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters