Skip to content

Commit

Permalink
app-admin/restart_services: moved, bumped
Browse files Browse the repository at this point in the history
  • Loading branch information
mschiff committed Feb 2, 2018
1 parent 6fbf5c7 commit 84f352d
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 76 deletions.
1 change: 1 addition & 0 deletions app-admin/restart-services/Manifest
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.
83 changes: 83 additions & 0 deletions app-admin/restart-services/restart-services-0.14.0.ebuild
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
}
2 changes: 0 additions & 2 deletions app-admin/restart_services/Manifest

This file was deleted.

37 changes: 0 additions & 37 deletions app-admin/restart_services/restart_services-0.13.0-r1.ebuild

This file was deleted.

37 changes: 0 additions & 37 deletions app-admin/restart_services/restart_services-0.13.1.ebuild

This file was deleted.

1 change: 1 addition & 0 deletions profiles/updates/1Q-2018
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ move app-portage/kuroo4 app-portage/kuroo
slotmove app-portage/kuroo 4 0
move dev-cpp/gsl dev-cpp/ms-gsl
slotmove =dev-util/cucumber-3.1.0 3.0 3.1
move app-admin/restart_services app-admin/restart-services

0 comments on commit 84f352d

Please sign in to comment.