From 5ea12ffadef212ed32d12683fb8071c0d94069b5 Mon Sep 17 00:00:00 2001 From: Joerg Deckert Date: Mon, 5 Dec 2016 16:17:25 +0100 Subject: [PATCH] screenservice: systemd support --- app-misc/screenservice/Manifest | 2 +- app-misc/screenservice/files/screen@.service | 12 ++++++++++++ ...enservice-1.1.ebuild => screenservice-1.2.ebuild} | 6 +++++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 app-misc/screenservice/files/screen@.service rename app-misc/screenservice/{screenservice-1.1.ebuild => screenservice-1.2.ebuild} (88%) diff --git a/app-misc/screenservice/Manifest b/app-misc/screenservice/Manifest index 3d5d37d..7656080 100644 --- a/app-misc/screenservice/Manifest +++ b/app-misc/screenservice/Manifest @@ -1,3 +1,3 @@ AUX screen-adm 146 SHA256 ff4eff5396b872d9a368597db6c2a4806ef234f95ded6894a1556c22b341462e SHA512 5d9a23c79602f0cee5b41f6e7ea5842ff50fe16d5a5847474772ebdbd422927aa6dab7ff5890f8bd932a44c5fca1960f43dd88128836787b68142d6e88585659 WHIRLPOOL 7d4948e04883d6b251a2134b190c7fcbad3a6efdd9717a09b718ce2e97d5949b3380b240e542d31554aad4c6239fa68ec4995259eb23cccc8d10a3045ffdaf56 AUX screen.init 2319 SHA256 6b48f64cb79b59088736e1aaebfb8eef410b53089ebe1886b9aca0ff3825718a SHA512 dffd05b6b5352c88416918113a9b66681ee31166ab6783408daf74636dcab9e77142800d43d3ffa022be2082c1c0e97807901d9782a9da9d67c94b3c24d16a2a WHIRLPOOL 375adc5ff690e4a11f11b15f7ea6f7b4574e2c21b6397a1f16e474fa7ec9e1fa530cbb75b91bf30d3747847556276868452d34080f88ea539e38ab178788cbcd -EBUILD screenservice-1.1.ebuild 580 SHA256 8cbf454ede26ee065d3591204dddc30cbea68bf29767e913395065f0f8139d2f SHA512 6317fc171a20ea8209658024b50b578720113cc0faeb65c00cea586d7d4662acf98b0fd083c391eb1b98a6a462ac17f8c123567f0f897d78431a1ee55f2b1ea4 WHIRLPOOL fef8ad56df7a79853bfe7c4724787c5a2ea8ac4dc9494f116a68bf6c9df7670d92823d70988cfa0d5ff2912287295c3d6b4b57357c0cd404ff51026d58f8e61d +EBUILD screenservice-1.2.ebuild 644 SHA256 a8c39a78a226441b337f65800f73278750ae385486525451003d5e6fc6dfad79 SHA512 7d31e72ae55b6c9d12f80a7907f6ce5ac40878d2d6c1873800b447de0a01882315bbf1a0f678b34285ba65f787f2fa100bc2b776fe305f26900083d005380663 WHIRLPOOL 2dccc0fb322ce593d0c543df9be057a95e5d6c665b9760831155596abd1b960554a0d2319eb3a4ab950ed649693c715318dda6a24b3b64975a1905e7106c2303 diff --git a/app-misc/screenservice/files/screen@.service b/app-misc/screenservice/files/screen@.service new file mode 100644 index 0000000..b775088 --- /dev/null +++ b/app-misc/screenservice/files/screen@.service @@ -0,0 +1,12 @@ +[Unit] +Description=screen +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/screen -U -D -m -c /etc/screen.d/screen-%i -S %i -t %i +ExecStop=/usr/bin/screen -S %i -X quit + +[Install] +WantedBy=multi-user.target diff --git a/app-misc/screenservice/screenservice-1.1.ebuild b/app-misc/screenservice/screenservice-1.2.ebuild similarity index 88% rename from app-misc/screenservice/screenservice-1.1.ebuild rename to app-misc/screenservice/screenservice-1.2.ebuild index 0b32fce..519e6b8 100644 --- a/app-misc/screenservice/screenservice-1.1.ebuild +++ b/app-misc/screenservice/screenservice-1.2.ebuild @@ -1,4 +1,7 @@ -EAPI="4" +EAPI="5" + +inherit systemd + DESCRIPTION="Start Screen sessions as a service" HOMEPAGE="https://bugs.gentoo.org/show_bug.cgi?id=381451" LICENSE="LGPL-2.1" @@ -10,6 +13,7 @@ DEPEND="${RDEPEND}" S=${WORKDIR} src_install() { + systemd_dounit "${FILESDIR}/screen@.service" newinitd "${FILESDIR}/screen.init" screen || die insinto /etc/screen.d