summaryrefslogtreecommitdiff
path: root/packaging/sysv/samba.init
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-12 16:34:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:59:56 -0500
commitb99ae5137471fad034dc7e98bc60cd2dc893b631 (patch)
treef1307088838e9490b1ed7a4e04f4eb8d9e330839 /packaging/sysv/samba.init
parentcfda53db8b22c7afbfae848506258f13ead041bf (diff)
downloadsamba-b99ae5137471fad034dc7e98bc60cd2dc893b631.tar.gz
samba-b99ae5137471fad034dc7e98bc60cd2dc893b631.tar.bz2
samba-b99ae5137471fad034dc7e98bc60cd2dc893b631.zip
r8384: merging clutter fixes from release branch
(This used to be commit cbe74c09109dcfe93aa4af085920999ccbff34df)
Diffstat (limited to 'packaging/sysv/samba.init')
-rwxr-xr-xpackaging/sysv/samba.init37
1 files changed, 37 insertions, 0 deletions
diff --git a/packaging/sysv/samba.init b/packaging/sysv/samba.init
new file mode 100755
index 0000000000..e021e911f6
--- /dev/null
+++ b/packaging/sysv/samba.init
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Copyright (c) Timo Knuutila <knuutila@cs.utu.fi> 1996.
+#
+# This file should have uid root, gid sys and chmod 744
+#
+if [ ! -d /usr/bin ]
+then # /usr not mounted
+ exit
+fi
+
+killproc() { # kill the named process(es)
+ pid=`/usr/bin/ps -e |
+ /usr/bin/grep -w $1 |
+ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+}
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+'start')
+#
+# Edit these lines to suit your installation (paths, workgroup, host)
+#
+ /opt/samba/bin/smbd -D -s/opt/samba/smb.conf
+ /opt/samba/bin/nmbd -D -l/opt/samba/log -s/opt/samba/smb.conf
+ ;;
+'stop')
+ killproc nmbd
+ killproc smbd
+ ;;
+*)
+ echo "Usage: /etc/init.d/samba.server { start | stop }"
+ ;;
+esac