lilalo
changeset 126:c3d04afa700f
initd-l3-backend added
author | igor@chub.in |
---|---|
date | Fri Jul 04 16:33:33 2008 +0300 (2008-07-04) |
parents | 078fab45d863 |
children | a92b17c77b57 |
files | initd-l3-backend |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/initd-l3-backend Fri Jul 04 16:33:33 2008 +0300 1.3 @@ -0,0 +1,32 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +L3_PATH="/usr/bin/" 1.7 +L3_BACKEND="./l3-backend" 1.8 + 1.9 +case "$1" in 1.10 + start) 1.11 + cd ${L3_PATH} 1.12 + nohup ${L3_BACKEND} > /dev/null 2>&1 & 1.13 + ;; 1.14 + stop) 1.15 + l3_backend_pid=`ps waux | grep -v grep | grep 'l3.backend' | awk '{print $2;}'` 1.16 + if [ -z "$l3_backend_pid" ] 1.17 + then 1.18 + echo "l3-backend is not running" 1.19 + else 1.20 + kill ${mywi_pid} 1.21 + fi 1.22 + ;; 1.23 + restart|reload) 1.24 + $0 stop && $0 start 1.25 + ;; 1.26 + stop|reload|restart|force-reload) 1.27 + ;; 1.28 + *) 1.29 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 1.30 + exit 1 1.31 + ;; 1.32 +esac 1.33 + 1.34 +exit 0 1.35 +