Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
3ee22a99
Commit
3ee22a99
authored
Feb 16, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create_sep_sites.sh: add support standalone sites
parent
e6ef2474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
create_sep_sites.sh
web/create_sep_sites.sh
+5
-3
No files found.
web/create_sep_sites.sh
View file @
3ee22a99
...
...
@@ -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
============
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment