webmin-samba-docker/Service-check.sh

22 lines
386 B
Bash
Raw Normal View History

2018-09-12 07:27:41 +02:00
#!/bin/bash
apt-get update && apt-get upgrade -y
wait
2018-11-21 00:59:13 +01:00
if [ ! -f /data/webmin/config ];
then
cp /etc/samba/* /data/samba/. && cp /etc/webmin/* /data/webmin/.
fi
wait
ln -f /data/samba/* /etc/samba/ && ln -f /etc/webmin/* /data/webmin/
2018-09-12 07:27:41 +02:00
service webmin start
service smbd start
service nmbd start
while true
do
if [[ $(service webmin status) = *stopped* ]]
then
break
else
sleep 5m
fi
2018-11-17 20:00:22 +01:00
done