Commit 3ee22a99 authored by Vitaly Lipatov's avatar Vitaly Lipatov

create_sep_sites.sh: add support standalone sites

parent e6ef2474
......@@ -10,7 +10,9 @@ fatal()
cat create_sep_sites.list | grep -v "#" | while read PORT URL ; do
[ -n "$PORT" ] || continue
NAME=$(basename $URL) || fatal "Empty URL in the list"
# HACK to support subdir sites
NAME=$(echo "$URL" | sed -e "s|^$MAINDOMAIN/||" -e "s|/|_|g")
[ -n "$NAME" ] || fatal "Empty URL in the list"
[ -L "$MAINSITEDIR/$NAME" ] && { echo "Skipping $NAME" ; continue ; }
echo
echo "Creating conf for $NAME..."
......@@ -22,7 +24,7 @@ cat create_sep_sites.list | grep -v "#" | while read PORT URL ; do
# HACK: azbyka specific
# Переименовываем, если это основной пользователь
if id $SEPUSER >/dev/null ; then
if id $SEPUSER >/dev/null 2>/dev/null ; then
#if getent passwd $SEPUSER | grep -q /home/azbyka/ ; then
# usermod -l ${SEPUSER/azbyka_/} $SEPUSER || fatal
# groupmod -n ${SEPUSER/azbyka_/} $SEPUSER || fatal
......@@ -32,7 +34,7 @@ cat create_sep_sites.list | grep -v "#" | while read PORT URL ; do
#fi
fi
test -d /home/$SEPUSER && fatal "$SEPUSER already created"
export HACKCOMMONDIR=":/home/azbyka/www/azbyka.ru/include:/home/azbyka/www/azbyka.ru/orphus"
export HACKCOMMONDIR=":/etc/httpd2/conf/include"
cat <<EOF
======== $SEPUSER ============
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment