Class: ActiveSambaLdap::Base
- Inherits:
-
ActiveLdap::Base
- Object
- ActiveLdap::Base
- ActiveSambaLdap::Base
show all
- Includes:
- Reloadable
- Defined in:
- lib/active_samba_ldap/base.rb
Class Method Summary
collapse
Methods included from Reloadable
included
Class Method Details
.restart_nscd ⇒ Object
119
120
121
122
123
124
125
|
# File 'lib/active_samba_ldap/base.rb', line 119
def restart_nscd
nscd_working = system("/etc/init.d/nscd status >/dev/null 2>&1")
system("/etc/init.d/nscd stop >/dev/null 2>&1") if nscd_working
yield if block_given?
ensure
system("/etc/init.d/nscd start >/dev/null 2>&1") if nscd_working
end
|