aboutsummaryrefslogtreecommitdiffstats
path: root/main/redmine/redmine.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/redmine/redmine.initd')
-rw-r--r--main/redmine/redmine.initd34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/redmine/redmine.initd b/main/redmine/redmine.initd
new file mode 100644
index 0000000000..e54f0e8f49
--- /dev/null
+++ b/main/redmine/redmine.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+
+gem_path=$(gem env gemdir)
+name="unicorn_rails"
+start_script="$gem_path/bin/$name"
+app_dir="/usr/share/webapps/redmine"
+user="redmine"
+
+start() {
+ ebegin "Starting redmine"
+ start-stop-daemon --start --quiet \
+ -u $user \
+ -d $app_dir \
+ $start_script -- \
+ -D -E production
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping redmine"
+ start-stop-daemon --stop \
+ --name $name
+ eend $?
+ sleep 1
+}
+
+
+reload() {
+ ebegin "Reload redmine"
+ start-stop-daemon --signal USR2 \
+ --name $name
+ eend $?
+}
+