Add inpxer
This commit is contained in:
11
www-apps/inpxer/files/01-config-placement-0.2.5.patch
Normal file
11
www-apps/inpxer/files/01-config-placement-0.2.5.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/internal/config/config.go 2024-09-16 02:47:23.666714944 +0300
|
||||
+++ b/internal/config/config.go 2024-09-16 02:47:50.696715919 +0300
|
||||
@@ -8,7 +8,7 @@
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
)
|
||||
|
||||
-const configFilename = "inpxer.toml"
|
||||
+const configFilename = "/etc/inpxer/inpxer.toml"
|
||||
|
||||
type MyConfig struct {
|
||||
Language string `toml:"language"`
|
30
www-apps/inpxer/files/inpxer-example.toml
Normal file
30
www-apps/inpxer/files/inpxer-example.toml
Normal file
@ -0,0 +1,30 @@
|
||||
# language used for interface and indexing
|
||||
language = "en" # en, ru
|
||||
# title displayed on web and in OPDS catalog
|
||||
title = "My library"
|
||||
# format for author's name. possible values:
|
||||
# - short: Fyodor Dostoevsky
|
||||
# - initials: F. M. Dostoevsky
|
||||
# - full: Fyodor Mikhailovich Dostoevsky
|
||||
author_name_format = "short"
|
||||
# where to store index
|
||||
# WARNING: keep in mind that this folder will be deleted during indexing,
|
||||
# don't point it to an existing location (and definitely don't set it equal to library_path)
|
||||
index_path = "/data/index"
|
||||
# where is you books stored
|
||||
library_path = "/data/library"
|
||||
# host:port to listen on
|
||||
listen = ":8080"
|
||||
# fully qualified url to server. required for OPDS (OpenSearch)
|
||||
full_url = "http://localhost:8080"
|
||||
|
||||
# format converters. can be as many as you want
|
||||
#[[converters]]
|
||||
## source file extension
|
||||
#from = "fb2"
|
||||
## target file extension
|
||||
#to = "epub"
|
||||
## converter executable
|
||||
#command = "fb2epub"
|
||||
## converter arguments. {from} becomes source file path, {to} - output file path, {to_dir} - output directory (for fb2converter)
|
||||
#arguments = "{from} {to}"
|
23
www-apps/inpxer/files/inpxer.initd-1
Normal file
23
www-apps/inpxer/files/inpxer.initd-1
Normal file
@ -0,0 +1,23 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Web server for .inpx libraries"
|
||||
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
|
||||
user=${user:-${RC_SVCNAME}}
|
||||
group=${group:-${RC_SVCNAME}}
|
||||
|
||||
command="/usr/sbin/inpxer"
|
||||
command_args="${command_args:-serve}"
|
||||
command_background="true"
|
||||
command_user="${user}:${group}"
|
||||
output_log="/var/log/inpxer/${RC_SVCNAME}.log"
|
||||
error_log="/var/log/inpxer/${RC_SVCNAME}.log"
|
||||
|
||||
depend() {
|
||||
after net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -q -d -m 0755 -o ${user}:${group} /var/log/inpxer
|
||||
}
|
9
www-apps/inpxer/files/inpxer.logrotate
Normal file
9
www-apps/inpxer/files/inpxer.logrotate
Normal file
@ -0,0 +1,9 @@
|
||||
/var/log/inpxer/inpxer.log {
|
||||
weekly
|
||||
rotate 10
|
||||
copytruncate
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
missingok
|
||||
}
|
Reference in New Issue
Block a user