File: all.sh

package info (click to toggle)
python-pysaml2 7.5.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 39,604 kB
  • sloc: xml: 388,184; python: 66,155; makefile: 148; sh: 80
file content (40 lines) | stat: -rwxr-xr-x 760 bytes parent folder | download
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
#!/bin/sh

startme() {
    cd sp-wsgi
    if [ ! -f sp_conf.py ] ; then
        cp sp_conf.py.example sp_conf.py
    fi
    if [ ! -f service_conf.py ] ; then
        cp service_conf.py.example service_conf.py
    fi
    ../../src/saml2/tools/make_metadata.py sp_conf > sp.xml

    cd ../idp2
    if [ ! -f idp_conf.py ] ; then
        cp idp_conf.py.example idp_conf.py
    fi
    ../../src/saml2/tools/make_metadata.py idp_conf > idp.xml

    cd ../sp-wsgi
    ./sp.py sp_conf &

    cd ../idp2
    ./idp.py idp_conf &

    cd ..
}

stopme() {
    pkill -f "sp.py"
    pkill -f "idp.py"
}

case "$1" in
    start)   startme ;;
    stop)    stopme ;;
    restart) stopme; startme ;;
    *) echo "usage: $0 start|stop|restart" >&2
       exit 1
       ;;
esac