Changeset 1582 in genappalpha


Ignore:
Timestamp:
Oct 20, 2018, 6:05:32 AM (3 weeks ago)
Author:
ehb
Message:

support for no_sudo

Location:
sbin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sbin/getapp.pl

    r1568 r1582  
    5353
    5454";
     55
     56$sudo = "sudo" if !-e "$gb/etc/no_sudo";
    5557
    5658my $admin;
     
    364366    my $cmd = $_[0];
    365367    $cmd =~ s/"/\\\"/g;
    366     $cmd = "sudo bash -c \"$cmd\"";
     368    $cmd = "$sudo bash -c \"$cmd\"";
    367369    print "sd cmd is <$cmd>\n" if $debug;
    368370    runcmd( $cmd );
  • sbin/reconfig

    r1573 r1582  
    3232require "$gb/etc/perl/genapp_util.pl";
    3333
     34$sudo = "sudo" if !-e "$gb/etc/no_sudo";
     35
    3436sub runcmd {
    3537    my $cmd = $_[0];
     
    4951    my $cmd = $_[0];
    5052    $cmd =~ s/"/\\\"/g;
    51     $cmd = "sudo bash -c \"$cmd\"";
     53    $cmd = "$sudo bash -c \"$cmd\"";
    5254    print "sd cmd is <$cmd>\n" if $debug;
    5355    runcmd( $cmd );
     
    203205    }
    204206
    205     runcmd( "sudo /etc/init.d/rc.genapp restart" ) if -x "/etc/init.d/rc.genapp";
     207    runcmd( "$sudo /etc/init.d/rc.genapp restart" ) if -x "/etc/init.d/rc.genapp";
    206208    if ( $$cfgjson{ 'webroot' } ) {
    207209        my $apacherestart;
Note: See TracChangeset for help on using the changeset viewer.