Univention Bugzilla – Attachment 5093 Details for
Bug 30331
Control of share access via computer room module is not working properly (Samba4)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Sample script for reloading/killing smbds
reload_smbds_and_kill_smbds_for_hosts_deny.sh (text/plain), 870 bytes, created by
Arvid Requate
on 2013-02-21 17:31:43 CET
(
hide
)
Description:
Sample script for reloading/killing smbds
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2013-02-21 17:31:43 CET
Size:
870 bytes
patch
obsolete
>#!/bin/bash > >eval "$(ucr shell)" > >Marktplatz_hosts_deny=() >if [ -n "$samba_share_Marktplatz_hosts_deny" ]; then > Marktplatz_hosts_deny=( $samba_share_Marktplatz_hosts_deny ) >fi > >othershares_hosts_deny=() >if [ -n "$samba_othershares_hosts_deny" ]; then > othershares_hosts_deny=( $samba_othershares_hosts_deny ) >fi > >kill_list=() >reload_list=() > >smbstatus=$(smbstatus -pfn) >while read -a REPLY; do > found=0 > for ip in "${Marktplatz_hosts_deny[@]}" "${othershares_hosts_deny[@]}"; do > if [ "$ip" = "${REPLY[3]}" ]; then > found=1 > break > fi > done > if [ "$found" = 1 ]; then > kill_list+=("${REPLY[0]}") > else > reload_list+=("${REPLY[0]}") > fi >done < <(echo "$smbstatus" | sed -nr 's/^([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9.:]+).*/\1 \2 \3 \4/p') > >if [ -n "$kill_list" ]; then > kill "${kill_list[@]}" >fi >if [ -n "$reload_list" ]; then > kill -HUP "${reload_list[@]}" >fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 30331
: 5093