aboutsummaryrefslogtreecommitdiff
path: root/net/subversion/files
diff options
context:
space:
mode:
authorDonald Rumata <donald.rumata@gmail.com>2016-02-18 18:43:20 -0500
committerDonald Rumata <donald.rumata@gmail.com>2016-06-11 01:30:46 -0400
commitf69a37532b8f4535f22f0a31be1d7715d9f91b8b (patch)
tree0d7e663d299e7c4eec083c3332d197bd5ce0b555 /net/subversion/files
parent1e9db6b217f7e09388c99909219c3184fd1c824a (diff)
subversion: bring back from oldpackages and update to current version
Bring back Subversion from oldpackages and update to the latest version. Create prerm script to stop subversion server and remove init script on uninstall. Signed-off-by: Donald Rumata <donald.rumata@gmail.com>
Diffstat (limited to 'net/subversion/files')
-rw-r--r--net/subversion/files/subversion.config3
-rw-r--r--net/subversion/files/subversion.init37
2 files changed, 40 insertions, 0 deletions
diff --git a/net/subversion/files/subversion.config b/net/subversion/files/subversion.config
new file mode 100644
index 000000000..3297c8de1
--- /dev/null
+++ b/net/subversion/files/subversion.config
@@ -0,0 +1,3 @@
+config subversion
+ option path '/var/local/svn'
+ option port '3690'
diff --git a/net/subversion/files/subversion.init b/net/subversion/files/subversion.init
new file mode 100644
index 000000000..660a29762
--- /dev/null
+++ b/net/subversion/files/subversion.init
@@ -0,0 +1,37 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2016 OpenWrt.org
+
+START=50
+
+start_instance () {
+ local section="$1"
+ config_get path "$section" 'path'
+ config_get port "$section" 'port'
+
+ if [ ! -d "$path" ]; then
+ echo "The subversion repository (${path}) does not exist."
+ echo "Create a new repository and/or change the path in /etc/config/subversion"
+ echo
+ echo "Create a new subversion repository with:"
+ echo " mkdir -p ${path}"
+ echo " svnadmin create --fs-type fsfs ${path}"
+ echo
+ echo "Changing the path using UCI (default path is: /var/local/svn):"
+ echo " uci set subversion.@[0].path="/srv/svn""
+ echo " uci commit"
+ echo " /etc/init.d/subversion restart"
+ return 1
+ fi
+
+ service_start /usr/bin/svnserve -d --listen-port ${port} -r ${path}
+}
+
+start() {
+ config_load 'subversion'
+ config_foreach start_instance 'subversion'
+}
+
+stop() {
+ SERVICE_SIG_STOP="INT" \
+ service_stop /usr/bin/svnserve
+}