archivers/urbackup-server: add default config and log rotation (via newsyslog)

PR:		227853
Submitted by:	Kirk Coombs <freebsd@coombscloud.com> (maintainer)
This commit is contained in:
Kurt Jaeger
2018-07-31 18:43:04 +00:00
parent 15dac70c75
commit af79bc01d0
6 changed files with 62 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
PORTNAME= urbackup-server
DISTVERSION= 2.2.11
PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= https://hndl.urbackup.org/Server/${DISTVERSION}/
@@ -24,9 +25,16 @@ CONFIGURE_ARGS= --enable-packaging
USE_RC_SUBR= urbackup_server
SUB_FILES= pkg-message
SUB_FILES= pkg-message urbackupsrv.conf.sample-daemon
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/urbackup
${INSTALL_DATA} ${WRKDIR}/urbackupsrv.conf.sample-daemon \
${STAGEDIR}${PREFIX}/etc/urbackup/urbackupsrv.conf.sample
${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
${INSTALL_DATA} ${FILESDIR}/urbackupsrv.conf.sample-newsyslog \
${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/urbackupsrv.conf.sample
${INSTALL_MAN} ${WRKSRC}/docs/urbackupsrv.1 ${STAGEDIR}${MANPREFIX}/man/man1
.include <bsd.port.mk>

View File

@@ -6,10 +6,16 @@ archivers/urbackup-server includes an RC script:
TO START URBACKUP SERVER ON BOOT:
sysrc urbackup_server_enable=YES
START MANUALLY:
TO START MANUALLY:
service urbackup_server start
Once started, visit the following to configure:
The server daemon's configuration file is located at:
%%PREFIX%%/etc/urbackup/urbackupsrv.conf
Log rotation can be configured at:
%%PREFIX%%/etc/newsyslog.conf.d/urbackupsrv.conf
Once started, configure backup settings and manage backups at:
http://localhost:55414
SECURITY WARNING:

View File

@@ -25,6 +25,6 @@ load_rc_config $name
command=%%PREFIX%%/bin/urbackupsrv
pidfile=/var/run/urbackupsrv.pid
command_args="run -d -w $pidfile"
command_args="run -d -w $pidfile -c %%PREFIX%%/etc/urbackup/urbackupsrv.conf"
run_rc_command "$1"

View File

@@ -0,0 +1,37 @@
#
# This is parsed as a key=value file
#
#Port for FastCGI requests
FASTCGI_PORT=55413
#Enable internal HTTP server
HTTP_SERVER="true"
#Port for the web interface
#(if internal HTTP server is enabled)
HTTP_PORT=55414
#Log file name
#If you change the LOGFILE, you should also change the "logfilename" in %%PREFIX%%/etc/newsyslog.conf.d/urbackupsrv.conf
LOGFILE="/var/log/urbackup.log"
#Either debug,warn,info or error
LOGLEVEL="warn"
#Temporary file directory
# -- this may get very large depending on the advanced settings
DAEMON_TMPDIR="/tmp"
#Tmp file directory for sqlite temporary tables.
#You might want to put the databases on another filesystem than the other temporary files.
#Default is the same as DAEMON_TMPDIR
SQLITE_TMPDIR=""
#Interfaces from which to send broadcasts. (Default: all).
#Comma separated -- e.g. "eth0,eth1"
BROADCAST_INTERFACES=""
#User the urbackupsrv process runs as
#If you change the USER, you should also change the "[owner:group]" in %%PREFIX%%/etc/newsyslog.conf.d/urbackupsrv.conf
USER="urbackup"

View File

@@ -0,0 +1,2 @@
# logfilename [owner:group] mode count size(kb) when flags [/pid_file] [sig_num]
/var/log/urbackup.log urbackup:urbackup 644 10 5120 * JC

View File

@@ -4,6 +4,8 @@ bin/urbackupsrv
@mode 0444
man/man1/urbackupsrv.1.gz
@mode 0644
@sample etc/urbackup/urbackupsrv.conf.sample
@sample etc/newsyslog.conf.d/urbackupsrv.conf.sample
share/urbackup/server-license.txt
share/urbackup/urbackup_ecdsa409k1.pub
share/urbackup/www/css/bootstrap-flat-extras.chash-958e73e0ffd138319a4c6be29fa24392.min.css
@@ -140,3 +142,6 @@ share/urbackup/www/swf/flashExport.swf
@owner urbackup
@group urbackup
@dir /var/urbackup
@mode 0555
@owner root
@group wheel