The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / samba4 / S91smb
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/samba4/S91smb b/cirros-testvm/src-cirros/buildroot-2015.05/package/samba4/S91smb
new file mode 100644 (file)
index 0000000..ce14e19
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+[ -f /etc/samba/smb.conf ] || exit 0
+
+mkdir -p /var/log/samba
+
+start() {
+       echo -n "Starting SMB services: "
+       smbd -D
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
+
+       echo -n "Starting NMB services: "
+       nmbd -D
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+
+stop() {
+       echo -n "Shutting down SMB services: "
+       kill -9 `pidof smbd`
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
+
+       echo -n "Shutting down NMB services: "
+       kill -9 `pidof nmbd`
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+
+restart() {
+       stop
+       start
+}
+
+reload() {
+        echo -n "Reloading smb.conf file: "
+       kill -HUP `pidof smbd`
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       restart
+       ;;
+  reload)
+       reload
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|restart|reload}"
+       exit 1
+esac
+
+exit $?