www-servers/hinsightd: added logrotate script and systemd unit

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alexandru Campeanu <tiotags1@gmail.com>
This commit is contained in:
tiotags
2021-04-19 10:50:00 +03:00
parent fa6c928b52
commit 398256d5a7
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
[Unit]
Description=hinsightd is a http/1.1 webserver
After=syslog.target network.target
[Service]
ExecStart=/usr/bin/hinsightd --config /etc/hinsightd/hinsightd.lua
ExecReload=/bin/kill -USR1 $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,14 @@
/var/log/hinsightd/*.log {
daily
missingok
rotate 7
compress
delaycompress
minsize 1M
notifempty
sharedscripts
postrotate
test -e /run/openrc/softlevel && /etc/init.d/hinsightd reload 1>/dev/null || true
test -e /run/systemd/system && systemctl reload hinsightd.service || true
endscript
}

View File

@@ -45,10 +45,15 @@ src_compile() {
src_install() {
newbin "${S}/build/hin9" hinsightd
newinitd "${FILESDIR}/init.d.sh" hinsightd
#systemd_dounit "${FILESDIR}/hinsightd.service" # not tested
insinto /etc/hinsightd
newins "${S}/workdir/main.lua" hinsightd.lua
# logrotate
insinto /etc/logrotate.d
newins "${FILESDIR}"/logrotate.d.sh hinsightd
keepdir /var/www/localhost/htdocs
keepdir /var/log/hinsightd
keepdir /var/tmp/hinsightd