mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
net-misc/purritobin: add init file
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
This commit is contained in:
16
net-misc/purritobin/files/purritobin.initd
Normal file
16
net-misc/purritobin/files/purritobin.initd
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2020-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
name="PurritoBin"
|
||||
description="ultra fast, minimalistic command line paste-bin"
|
||||
|
||||
command="/usr/bin/purrito"
|
||||
command_background=true
|
||||
command_args="${ARGS:- -d /var/www/purritobin/}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_user="purritobin:purritobin"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
17
net-misc/purritobin/files/purritobin.service
Normal file
17
net-misc/purritobin/files/purritobin.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=PurritoBin
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
SyslogIdentifier=purritobin
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Type=simple
|
||||
User=purritobin
|
||||
Group=purritobin
|
||||
WorkingDirectory=/var/www/purritobin
|
||||
ExecStart=/usr/bin/purritobin
|
||||
TimeoutStopSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Copyright 2019-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@@ -6,7 +6,7 @@ EAPI=7
|
||||
DESCRIPTION="minimalistic commandline pastebin"
|
||||
HOMEPAGE="https://bsd.ac"
|
||||
|
||||
inherit toolchain-funcs
|
||||
inherit systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
@@ -20,7 +20,11 @@ fi
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="net-libs/usockets[ssl]"
|
||||
RDEPEND="
|
||||
net-libs/usockets[ssl]
|
||||
acct-user/purritobin
|
||||
acct-group/purritobin
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
www-apps/uwebsockets
|
||||
"
|
||||
@@ -32,5 +36,10 @@ src_configure() {
|
||||
|
||||
src_install() {
|
||||
emake PREFIX="/usr" MANDIR="/usr/share/man" DESTDIR="${ED}" install
|
||||
insinto /var/www/purritobin
|
||||
doins frontend/paste.html
|
||||
fowners purritobin:purritobin /var/www/purritobin
|
||||
newinitd "${FILESDIR}"/purritobin.initd purritobin
|
||||
systemd_dounit "${FILESDIR}"/purritobin.service
|
||||
einstalldocs
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Copyright 2019-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@@ -6,7 +6,7 @@ EAPI=7
|
||||
DESCRIPTION="minimalistic commandline pastebin"
|
||||
HOMEPAGE="https://bsd.ac"
|
||||
|
||||
inherit toolchain-funcs
|
||||
inherit systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
@@ -20,7 +20,11 @@ fi
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="net-libs/usockets[ssl]"
|
||||
RDEPEND="
|
||||
net-libs/usockets[ssl]
|
||||
acct-user/purritobin
|
||||
acct-group/purritobin
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
www-apps/uwebsockets
|
||||
"
|
||||
@@ -32,5 +36,10 @@ src_configure() {
|
||||
|
||||
src_install() {
|
||||
emake PREFIX="/usr" MANDIR="/usr/share/man" DESTDIR="${ED}" install
|
||||
insinto /var/www/purritobin
|
||||
doins frontend/paste.html
|
||||
fowners purritobin:purritobin /var/www/purritobin
|
||||
newinitd "${FILESDIR}"/purritobin.initd purritobin
|
||||
systemd_dounit "${FILESDIR}"/purritobin.service
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user