Changeset 1682 in genapp


Ignore:
Timestamp:
Mar 20, 2019, 8:03:18 AM (3 years ago)
Author:
ehb
Message:

Fixes for 18.04 & setconfig issue

Location:
sbin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sbin/install.pl

    r1657 r1682  
    525525}
    526526
    527 # ------ centos 7.2,7.3,7.4,7.5 -------
     527# ------ centos 7.2,7.3,7.4,7.5,7.6-------
    528528if ( $os eq 'centos' && $os_release =~ /^7\.(2|3|4|5|6)/ ) {
    529529
     
    910910    runcmd( "sudo add-apt-repository -y ppa:ondrej/php && sudo apt-get -y update" );
    911911    runcmd( "sudo apt-get -y install mlocate build-essential apache2 php5.6-dev libapache2-mod-php5.6 php5.6-xml pkg-config re2c libzmq${zmqv}-dev uuid-dev abiword wget mongodb libmagickwand-6.q16-dev" );
     912
     913    # need zeromq from source :(
     914
     915    runcmd( "rm -fr /tmp/libzmq 2>/dev/null; cd /tmp && git clone git://github.com/zeromq/libzmq.git && cd libzmq && ./autogen.sh && ./configure && make -j$CPUS && make -j$CPUS check && sudo make -j$CPUS install && cat <<_EOF > /etc/ld.so.conf.d/zeromq.conf
     916/usr/local/lib
     917_EOF
     918sudo ldconfig
     919 " ) if !-e "/usr/local/lib/libzmq.so" || !-e "/etc/ld.so.conf.d/zeromq.conf";
    912920
    913921# php-pear php-imagick php-mail php-mail-mime php-mongodb mongodb" );
  • sbin/setconfig.pl

    r1598 r1682  
    4141 -pj                           print resulting config.json
    4242 -https                        use https and wss
     43 -publicport                   specify a public port (used for websockets)
    4344 -webroot webroot              specify the webroot directory
    4445 -mongossl hostname cafile     specify the hostname and certificate file for mongod
     
    8081        die "$0: option $option requries an argument\n" . $notes if !@ARGV;
    8182        $webroot = shift @ARGV;;
     83        next;
     84    }
     85    if ( $option =~ /^-publicport$/ ) {
     86        die "$0: option $option requries an argument\n" . $notes if !@ARGV;
     87        $publicport = shift @ARGV;;
    8288        next;
    8389    }
     
    285291
    286292my $wssport    = $https ? 443 : 80;
     293$wssport    = $publicport if $publicport;
    287294my $wsport     = 30777;
    288295my $zmqport    = 30778;
     
    440447    }
    441448} else {
    442     $$json{'mongo'}{'url'} = $mongourl;
     449    if ( $mongourl ) {
     450        $$json{'mongo'}{'url'} = $mongourl;
     451    } else {
     452        delete $$json{'mongo'};
     453    }
    443454}
    444455
     
    451462    }
    452463} else {
    453     $$json{'mongo'}{'cafile'} = $mongocafile;
     464    if ( $mongocafile ) {
     465        $$json{'mongo'}{'cafile'} = $mongocafile;
     466    } else {
     467        delete $$json{'mongo'};
     468    }
    454469}
    455470
Note: See TracChangeset for help on using the changeset viewer.