aboutsummaryrefslogtreecommitdiff
path: root/archivers/urbackup-server
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2018-07-31 18:43:04 +0000
committerKurt Jaeger <pi@FreeBSD.org>2018-07-31 18:43:04 +0000
commitaf79bc01d00f3ff35e44add6c3b35d2b02ce85f3 (patch)
treeb34c17ffec41f3f20d09b504ed993b683138a853 /archivers/urbackup-server
parent15dac70c75ad7e5286c80ca05c69fbfc1061905c (diff)
downloadports-af79bc01d00f3ff35e44add6c3b35d2b02ce85f3.tar.gz
ports-af79bc01d00f3ff35e44add6c3b35d2b02ce85f3.zip
archivers/urbackup-server: add default config and log rotation (via newsyslog)
PR: 227853 Submitted by: Kirk Coombs <freebsd@coombscloud.com> (maintainer)
Notes
Notes: svn path=/head/; revision=476014
Diffstat (limited to 'archivers/urbackup-server')
-rw-r--r--archivers/urbackup-server/Makefile10
-rw-r--r--archivers/urbackup-server/files/pkg-message.in10
-rw-r--r--archivers/urbackup-server/files/urbackup_server.in2
-rw-r--r--archivers/urbackup-server/files/urbackupsrv.conf.sample-daemon.in37
-rw-r--r--archivers/urbackup-server/files/urbackupsrv.conf.sample-newsyslog2
-rw-r--r--archivers/urbackup-server/pkg-plist5
6 files changed, 62 insertions, 4 deletions
diff --git a/archivers/urbackup-server/Makefile b/archivers/urbackup-server/Makefile
index d9d995c104ee..3a699ff448a9 100644
--- a/archivers/urbackup-server/Makefile
+++ b/archivers/urbackup-server/Makefile
@@ -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>
diff --git a/archivers/urbackup-server/files/pkg-message.in b/archivers/urbackup-server/files/pkg-message.in
index b4105b3d8444..c65c8ec89c63 100644
--- a/archivers/urbackup-server/files/pkg-message.in
+++ b/archivers/urbackup-server/files/pkg-message.in
@@ -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:
diff --git a/archivers/urbackup-server/files/urbackup_server.in b/archivers/urbackup-server/files/urbackup_server.in
index 9a16234fea13..2fec15543053 100644
--- a/archivers/urbackup-server/files/urbackup_server.in
+++ b/archivers/urbackup-server/files/urbackup_server.in
@@ -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"
diff --git a/archivers/urbackup-server/files/urbackupsrv.conf.sample-daemon.in b/archivers/urbackup-server/files/urbackupsrv.conf.sample-daemon.in
new file mode 100644
index 000000000000..ddc1789caf6e
--- /dev/null
+++ b/archivers/urbackup-server/files/urbackupsrv.conf.sample-daemon.in
@@ -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"
diff --git a/archivers/urbackup-server/files/urbackupsrv.conf.sample-newsyslog b/archivers/urbackup-server/files/urbackupsrv.conf.sample-newsyslog
new file mode 100644
index 000000000000..a42132958f4b
--- /dev/null
+++ b/archivers/urbackup-server/files/urbackupsrv.conf.sample-newsyslog
@@ -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
diff --git a/archivers/urbackup-server/pkg-plist b/archivers/urbackup-server/pkg-plist
index 0ba51229c55b..5f24c41076f8 100644
--- a/archivers/urbackup-server/pkg-plist
+++ b/archivers/urbackup-server/pkg-plist
@@ -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