summaryrefslogtreecommitdiff
path: root/app-admin/restart-services
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/restart-services
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/restart-services')
-rw-r--r--app-admin/restart-services/Manifest3
-rw-r--r--app-admin/restart-services/metadata.xml8
-rw-r--r--app-admin/restart-services/restart-services-0.14.1.ebuild83
3 files changed, 94 insertions, 0 deletions
diff --git a/app-admin/restart-services/Manifest b/app-admin/restart-services/Manifest
new file mode 100644
index 000000000000..381332c254ea
--- /dev/null
+++ b/app-admin/restart-services/Manifest
@@ -0,0 +1,3 @@
+DIST restart-services-0.14.1.tgz 20909 BLAKE2B 2f6b74fc6094be83e1872d2a6ca7abb02a49b5db65d81cd37f8161bac148e5fe0614502f1f06356ff9cd6c6ba03c416dae1eec3a86f48dc011bc6e28c1b076e3 SHA512 3434c4b6cdf9d02b035eba2cc67cebe8e06a2cf31c2d8627063b84224dcb6d44e276e1fcb82221ad77ab7ee7e16fa7ee58fb94b7849d40e6786d3fcfb6087866
+EBUILD restart-services-0.14.1.ebuild 2285 BLAKE2B 7eb13e920790aae88e74b10cce100923aa490726011cdc33f96d0a38be957a0cbdc44e13a52b51a8b3c8d30e33464f72073f49888ffc4c573a65287ed49624c7 SHA512 841a1c6fa9d4c8b435f015c1785dd7c39929c808d771b7095f89a2d2832664a5b8915b3dfe56db5d9e4898a3d21b93e2c8ae01fa4502f33e5396ec6508c55a53
+MISC metadata.xml 250 BLAKE2B fef48a48388f26a915c53bca9aa9cab62fb73ec006736542afb4cbbe0c7b81d23afe2884f52433c7d390fc38ac32f957a6f6efe285ee1cafaed76407a964cf9b SHA512 924271cfb32ceafc4134e19b53fbeed96f2e9056addc3c2cbdec28890254abf5f0714979a3ab698ca046e41ef5c2cca2932350830bd8bd3a8e214d99123c12de
diff --git a/app-admin/restart-services/metadata.xml b/app-admin/restart-services/metadata.xml
new file mode 100644
index 000000000000..ea6b59e79026
--- /dev/null
+++ b/app-admin/restart-services/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+</pkgmetadata>
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
+}