Add smart
This commit is contained in:
8
apply.pl
8
apply.pl
@@ -138,17 +138,17 @@ sub handle_request()
|
||||
if( $p{mars_config} ne $mars_config )
|
||||
{
|
||||
# Just append the line. Messy but easy. ;)
|
||||
open( FILE, '>>' . $base . 'smart.conf' );
|
||||
open( FILE, '>>' . $smart_conf_path ) or die "Could not open $smart_conf_path: $!";
|
||||
print( FILE "\n" . '$mars_config = \'' . $p{mars_config} . '\';' . "\n" );
|
||||
close( FILE );
|
||||
}
|
||||
|
||||
open( FILE, '>' . $base . '.nwclient' );
|
||||
open( FILE, '>' . $smart_nwclient_path ) or die "Could not open $smart_nwclient_path: $!";
|
||||
print( FILE $p{bind_server} . '/' . $p{bind_user} . ' ' . $p{bind_pass } . "\n" );
|
||||
close( FILE );
|
||||
|
||||
chown( scalar( getpwnam( $nonroot_user ) ), 0, $base . '.nwclient' );
|
||||
chmod( 0600, $base . '.nwclient' );
|
||||
chown( scalar( getpwnam( $nonroot_user ) ), 0, $smart_nwclient_path );
|
||||
chmod( 0600, $smart_nwclient_path );
|
||||
}
|
||||
elsif( $c[1] eq 'users' )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user