#!/bin/sh mkdir $1/n4d-server systemctl status n4d > $1/n4d-server/status systemctl restart n4d 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