File: start.sh

package info (click to toggle)
pymilter 0.8.9-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 928 kB
  • ctags: 559
  • sloc: python: 3,605; ansic: 978; sh: 316; makefile: 46
file content (14 lines) | stat: -rwxr-xr-x 336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
appname="$1"
script="${2:-${appname}}"
datadir=/var/log/milter
python="python2.4"
exec >>${datadir}/${appname}.log 2>&1
if test -s ${datadir}/${script}.py; then
  cd ${datadir} # use version in log dir if it exists for debugging
else
  cd /usr/lib/pymilter
fi

${python} ${script}.py &
echo $! >/var/run/milter/${appname}.pid