samba/files/start.sh
Dominika Hodovska 35193e7f84 Add basic test
2017-06-13 07:16:49 +02:00

38 lines
557 B
Bash
Executable file

#! /bin/sh -e
function first
{
echo $1
}
function rest
{
shift
echo $@
}
date > /srv/samba/tst-run
/usr/sbin/nmbd -D
/usr/sbin/smbd -D
waits="1 1 2 4 8 16 32 64 360"
while pidof smbd > /dev/null && pidof nmbd > /dev/null ; do
date
echo "SMBd proces" $(pidof smbd)
echo "NMBd proces" $(pidof nmbd)
sleep $(first $waits)
if [ "x$(rest $waits)" != "x" ]; then
waits="$(rest $waits)"
fi
echo
done
if ! pidof nmbd; then
echo "NMBd is not running."
fi
if ! pidof smbd; then
echo "SMBd is not running."
fi