diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-08-16 07:38:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-08-16 07:38:47 +0000 |
commit | 57417cdaba60d718d5d57d5abe00bbe445769cad (patch) | |
tree | 2b40eb509d92adf2cae446124b1c0b360bf8bbb9 /examples/svr4-startup | |
parent | 7b925230fc39e3286470e40f5467cbb524f335c3 (diff) | |
download | samba-57417cdaba60d718d5d57d5abe00bbe445769cad.tar.gz |
SVR4 startup scripts from Timo Knuutila (knuutila@cs.utu.fi)
Diffstat (limited to 'examples/svr4-startup')
-rw-r--r-- | examples/svr4-startup/README | 24 | ||||
-rwxr-xr-x | examples/svr4-startup/samba.server | 38 |
2 files changed, 62 insertions, 0 deletions
diff --git a/examples/svr4-startup/README b/examples/svr4-startup/README new file mode 100644 index 00000000000..8ed9f744770 --- /dev/null +++ b/examples/svr4-startup/README @@ -0,0 +1,24 @@ +Hi and thanks for this great software. + +Solaris (and other sysv) machines have a standardized way of +starting and shutting down services (you may well know that already). + +Here's a piece of code one could place under /etc/init.d +and create appropriate link from, say + + /etc/rc2.d/S99samba.server + +to make smbd start and stop automatically with system bootups and +shutdowns. Each one should edit the lines containing the +daemon calls to agree with his/her installation (the code below +works with the defaults) and workgroup setup (we use the -G and -n +options). + + +I hope this will be of use --- at least it is for me. + +Yours, + +Timo Knuutila +knuutila@cs.utu.fi + diff --git a/examples/svr4-startup/samba.server b/examples/svr4-startup/samba.server new file mode 100755 index 00000000000..0a47fdb10ce --- /dev/null +++ b/examples/svr4-startup/samba.server @@ -0,0 +1,38 @@ +#!/bin/sh +#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/ +# +# Please send info on modifications to knuutila@cs.utu.fi +# +# 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 |