#!/bin/sh mkdir $1/n4d-server status n4d > $1/n4d-server/status service n4d restart sleep 10 cp /var/log/n4d/* $1/n4d-server/ if [ -e "/tmp/n4d-oneshot.log" ]; then cp /tmp/n4d-oneshot.log $1/n4d-server/ fi