aboutsummaryrefslogtreecommitdiffstats
path: root/main/redmine/redmine.initd
blob: 3371c6d98102f66f37f1b6d9ce598c8292b13d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/sbin/runscript

gem_path=$(gem env gemdir)
name="unicorn_rails"
start_script="$gem_path/bin/$name"
app_dir="/usr/share/webapps/redmine"
user="redmine"

depend() {
        use logger dns
        need net
        after firewall
}

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 $?
}