mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-11 08:03:16 -04:00
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:
10
www-servers/hinsightd/files/hinsightd.service
Normal file
10
www-servers/hinsightd/files/hinsightd.service
Normal 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
|
||||
14
www-servers/hinsightd/files/logrotate.d.sh
Normal file
14
www-servers/hinsightd/files/logrotate.d.sh
Normal 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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user