nginx_del.sh

#!/bin/bash
USER_CONF="include /usr/local/directadmin/data/users/$1/nginx.conf;";
if cp /usr/local/nginx/etc/virtual.conf /usr/local/nginx/etc/virtual.conf.bak; then
    rm -rf /usr/local/nginx/etc/users/$1;
    STR="/usr/bin/perl -pi -e 's#$USER_CONF##' /usr/local/nginx/etc/virtual.conf.bak";
    eval ${STR};
    sed '/^$/d' /usr/local/nginx/etc/virtual.conf.bak > /usr/local/nginx/etc/virtual.conf;
    rm -rf /usr/local/nginx/etc/virtual.conf.bak
fi
 
nginx/nginx_del.sh.txt · Last modified: 2010/02/07 17:59 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki