debian – 有什么问题? “语法错误:意外的文件结束”

我一直收到这个错误,你们知道出了什么问题吗?

rapache是​​重启apache的别名

mugbear:/usr/bin# cat /usr/bin/mkdomain                                         
if [ -d "/srv/www/$1" ]; then
        echo "Domain $1 already exists!"
else
        mkdir -p /srv/www/$1/public_html
        mkdir -p /srv/www/$1/logs
        cat >> /etc/apache2/sites-available/"$1" << EOF
        <VirtualHost removed:80>
                ServerAdmin support@$1
                ServerName $1
                ServerAlias www.$1
                        DocumentRoot /srv/www/$1/public_html/
                ErrorLog /srv/www/$1/logs/error.log
                CustomLog /srv/www/$1/logs/access.log combined
        </VirtualHost>
        EOF
        a2ensite $1
    rapache
fi
mugbear:/usr/bin# mkdomain test.com                                        
/usr/bin/mkdomain: line 19: Syntax error: unexpected end of file
你的heredoc永远不会结束,因为终结符不在行的开头.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...