全球主机交流论坛
标题:
求帮忙看下这个是啥问题,谢谢。
[打印本页]
作者:
zzr
时间:
2014-11-15 20:01
标题:
求帮忙看下这个是啥问题,谢谢。
本帖最后由 zzr 于 2014-11-15 20:13 编辑
解决方法:
sudo dpkg-reconfigure dash
选择no即可
感谢@月の天使
提示这个:
Do you want to add more domain name? (y/n)
y
vhost_hhvm.sh: 41: [: y: unexpected operator
41行是这个 if [ "$add_more_domainame" == 'y' ]; then
我看这个代码和lnmp差不多,就替换成lnmp的也不行。。。。。。求带。。。
#!/bin/bash
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, use sudo sh $0"
exit 1
fi
clear
echo "========================================================================="
echo "Add Virtual Host for LTMH , Written by Andy "
echo "========================================================================="
echo "LTMH is a tool to auto-compile & install Tengine+MySQL+HHVM on Linux "
echo "This script is a tool to add virtual host for tengine "
echo "For more information please visit http://www.hhvmc.com"
echo ""
echo "========================================================================="
if [ "$1" != "--help" ]; then
domain="www.hhvmc.com"
echo "Please input domain:"
read -p "(Default domain: www.hhvmc.com):" domain
if [ "$domain" = "" ]; then
echo "Error: Domain Name Can't be empty!!"
exit 1
fi
if [ ! -f "/usr/local/nginx/conf/vhost/$domain.conf" ]; then
echo "==========================="
echo "domain=$domain"
echo "==========================="
else
echo "==========================="
echo "$domain is exist!"
echo "==========================="
fi
echo "Do you want to add more domain name? (y/n)"
read add_more_domainame
if [ "$add_more_domainame" == 'y' ]; then
echo "Type domainname,example(bbs.vpser.net forums.vpser.net luntan.vpser.net):"
read moredomain
echo "==========================="
echo domain list="$moredomain"
echo "==========================="
moredomainame=" $moredomain"
fi
vhostdir="/home/wwwroot/$domain"
echo "Please input the directory for the domain:$domain :"
复制代码
作者:
月の天使
时间:
2014-11-15 20:08
sudo dpkg-reconfigure dash
选择no即可
作者:
zzr
时间:
2014-11-15 20:12
感谢mjj的帮助 已经解决。
欢迎光临 全球主机交流论坛 (https://hostloc.gdisk.cf/)
Powered by Discuz! X3.4