#!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.17 2007/09/11 22:55:08 uberlord Exp $ DAEMON="/usr/local/bin/winsim/ConnectionManager/SimplyConnectionManager.exe" PID_FILE="/var/run/SimplyConnMgr.pid" LOCK_FILE="/var/lock/subsys/SimplyConnMgr" depend() { need samba } start() { ebegin "Starting SimplyConnMgr" mono-service2 -l:"$PID_FILE" "$DAEMON" count=0 while [ ! -f "$PID_FILE" -a $count -lt 10 ]; do sleep 3s count=$((count + 1)) done [ -f "$PID_FILE" ] || eerror "Could not start SimplyConnMgr" && eend 1 touch "$LOCK_FILE" eend 0 } stop() { ebegin "Stopping SimplyConnMgr" kill `cat "$PID_FILE"` retval=$? if [ "$retval" == "0" ]; then rm -Rf "$LOCK_FILE" "$PID_FILE"; fi eend $retval }