diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:00 +0000 |
commit | 8daa83a594a2e98f39d764422bfbdbc62c9efd44 (patch) | |
tree | 4099e8021376c7d8c05bdf8503093d80e9c7bad0 /packaging/Example/samba.init | |
parent | Initial commit. (diff) | |
download | samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.tar.xz samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.zip |
Adding upstream version 2:4.20.0+dfsg.upstream/2%4.20.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/Example/samba.init')
-rwxr-xr-x | packaging/Example/samba.init | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/packaging/Example/samba.init b/packaging/Example/samba.init new file mode 100755 index 0000000..c1d605c --- /dev/null +++ b/packaging/Example/samba.init @@ -0,0 +1,34 @@ +#!/bin/sh +# +if [ ! -d /usr/bin ]; then + echo "The /usr file system is not mounted." + exit 1 +fi + +killproc() { + pid=`/bin/ps ax | grep -w $1 | sed -e 's/^ *//' -e 's/ .*//'` + echo "Stopping $1 now." + [ "$pid" != "" ] && kill -15 $pid + echo $pid +} + + +# Start/stop processes required for samba server + +case "$1" in + + 'start') + echo "Starting Samba" + /usr/local/samba/sbin/smbd + /usr/local/samba/sbin/nmbd + echo "Done." + ;; + 'stop') + killproc smbd + killproc nmbd + ;; + *) + echo "Usage: /sbin/init.d/samba.init [ start | stop ]" + ;; +esac +exit 0 |