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:
Aisha Tammy
2021-01-11 11:07:35 -05:00
parent f1d65d31cf
commit d0d685768d
4 changed files with 57 additions and 6 deletions

View 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
}

View 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

View File

@@ -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
}

View File

@@ -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
}