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
c8d72e22
Commit
c8d72e22
authored
Jul 11, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve to save aliases for sites
parent
ef79e004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
refresh_site_conf.sh
web/refresh_site_conf.sh
+10
-8
No files found.
web/refresh_site_conf.sh
View file @
c8d72e22
...
...
@@ -2,26 +2,27 @@
.
./config
.
./functions
.
./functions-apache
cd
/etc/httpd2/conf/sites-enabled
||
exit
getVar
()
{
cat
$1
|
sed
-e
"s/^[
\t
]*
\(
.*
\)
/
\1
/g"
|
grep
-v
"^#"
|
grep
"^
$2
"
|
cut
-f
2
-d
" "
}
LISTCONF
=
"*.conf"
[
-n
"
$*
"
]
&&
LISTCONF
=
"
$*
"
for
i
in
*
.conf
;
do
DOMAINNAME
=
$(
get
V
ar
$i
ServerName |
tr
[
A-Z]
[
a-z]
)
USERNAME
=
$(
get
Var
$i
AssignUserID
)
for
i
in
$LISTCONF
;
do
DOMAINNAME
=
$(
get
_v
ar
$i
ServerName |
tr
[
A-Z]
[
a-z]
)
USERNAME
=
$(
get
_var
$i
AssignUserID |
cut
-f1
-d
" "
)
[
-n
"
$DOMAINNAME
"
]
||
continue
echo
"File
$i
, site:
$DOMAINNAME
, user:
$USERNAME
"
if
[
"
$i
"
!=
"
$DOMAINNAME
.conf"
]
;
then
echo
"
F
ile conf name and site name are not equal!"
echo
"
ERROR with
$i
: f
ile conf name and site name are not equal!"
continue
fi
set_vars
ALIASLIST
=
$(
get_aliaslist
$i
)
[
-z
"
$ALIASLIST
"
]
||
echo
" Alias list:
$ALIASLIST
"
mkdir
-p
$SESSIONDIR
/
chown
$USERNAME
$SESSIONDIR
/
...
...
@@ -29,4 +30,5 @@ for i in *.conf ; do
check_dirs
create_site_config
done
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