浏览代码

provision.pl - escaped slashes now fixed

tags/release-00
gashapwn 3 年前
父节点
当前提交
c60ffcca62
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. +7
    -7
      perl-script/provision.pl

+ 7
- 7
perl-script/provision.pl 查看文件

@@ -67,8 +67,8 @@ system("pkg_add p5-JSON");
system("pkg_add apache-httpd");

# enable the userdir module
system("sed -i -e 's/^\(.\)*#\(LoadModule userdir_module\)/\1\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\(.\)*#\(Include \/etc\/apache2\/extra\/httpd-userdir.conf\)/\1\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\\(.\\)*#\\(LoadModule userdir_module\\)/\\1\\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\\(.\\)*#\\(Include \\/etc\\/apache2\\/extra\\/httpd-userdir.conf\\)/\\1\\2/' /etc/apache2/httpd2.conf");
# Enable the CGI directory
system("echo '<Directory \"/home/*/public_html/cgi/\">
Require all granted
@@ -76,11 +76,11 @@ system("echo '<Directory \"/home/*/public_html/cgi/\">
AddHandler cgi-script .cgi
</Directory>' >> /etc/apache2/extra/httpd-userdir.conf");
# Enable the CGI modules
system("sed -i -e 's/^\(.\)*#\(LoadModule cgi_module\)/\1\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\(.\)*#\(LoadModule cgid_module\)/\1\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\\(.\\)*#\\(LoadModule cgi_module\\)/\\1\\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\\(.\\)*#\\(LoadModule cgid_module\\)/\\1\\2/' /etc/apache2/httpd2.conf");
# Disable directory listing
system("sed -i -e 's/\(<\/Directory>\)/ Options -Indexes\
\1/g' /etc/apache2/extra/httpd-userdir.conf");
system("sed -i -e 's/\\(<\\/Directory>\\)/ Options -Indexes\\
\\1/g' /etc/apache2/extra/httpd-userdir.conf");

# Change the port to 5001
system("sed -i -e 's/^\(.\)*Listen *80/\1Listen 5001/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\\(.\\)*Listen *80/\\1Listen 5001/' /etc/apache2/httpd2.conf");

正在加载...
取消
保存