#!/bin/sh for i in $@; do ./ctl stop ${i} done kill -9 $(ps ax | grep ffserver | grep -v grep | awk '{ print $1 }') rm ../tmp/* ../scripts/ffserver onestart sleep 2 for i in $@; do ./ctl start ${i} done