File: sc.conf

package info (click to toggle)
ruby-blade-sauce-labs-plugin 0.7.3%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 25,216 kB
  • sloc: ruby: 651; ansic: 98; sh: 21; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 689 bytes parent folder | download | duplicates (8)
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
# vim:ft=upstart:
description "SauceLabs' Sauce Connect tunnel worker supervisor service"

start on runlevel [2345]
stop on runlevel [016]

pre-start script
    # Load configuration
    test -r /etc/default/sc || { stop; exit 0; }
    . /etc/default/sc
    test -n "$SE_PORTS" || { stop; exit 1; }

    for se_port in $SE_PORTS
    do
        start sc_worker SE_PORT=$se_port
    done
end script

post-stop script
    # Load configuration
    test -r /etc/default/sc || { stop; exit 0; }
    . /etc/default/sc
    test -n "$SE_PORTS" || { stop; exit 1; }

    for se_port in $SE_PORTS
    do
        stop sc_worker SE_PORT=$se_port || true  # ignore shutdown instances
    done
end script