aboutsummaryrefslogtreecommitdiffstats
path: root/community/seahub/seahub.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/seahub/seahub.initd')
-rw-r--r--community/seahub/seahub.initd19
1 files changed, 19 insertions, 0 deletions
diff --git a/community/seahub/seahub.initd b/community/seahub/seahub.initd
new file mode 100644
index 0000000000..faee878e3b
--- /dev/null
+++ b/community/seahub/seahub.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+export SEAHUB_LOG_DIR=/var/lib/seafile/$instance/logs
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Seafile $instance instance"
+ start-stop-daemon --chdir /var/lib/seafile/$instance --user $seafile_user \
+ --group $seafile_group /usr/bin/seafile-admin start
+}
+
+stop() {
+ ebegin "Stopping Seafile $instance instance"
+ start-stop-daemon --chdir /var/lib/seafile/$instance /usr/bin/seafile-admin \
+ stop
+}