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
51959d36
Commit
51959d36
authored
May 17, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve script
parent
86ed4e2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
createbytask.int.sh
vz/azbyka/createbytask.int.sh
+7
-2
createbytask.sh
vz/azbyka/createbytask.sh
+8
-9
No files found.
vz/azbyka/createbytask.int.sh
View file @
51959d36
#!/bin/bash
-x
#!/bin/bash
fatal
()
{
...
...
@@ -78,12 +78,17 @@ tune_php7()
tune_apache2
()
{
for
i
in
mod_php7 status mpm_itk remoteip setenvif rewrite session
;
do
for
i
in
mod_php7 status mpm_itk remoteip setenvif rewrite session
;
do
a2enmod
$i
done
for
i
in
include
;
do
a2dismod
$i
done
for
i
in
httpd-multilang-errordoc
;
do
a2disextra
$i
done
cat
<<
EOF
> /etc/httpd2/conf/mods-available/remoteip.conf
<IfModule remoteip_module>
RemoteIPHeader X-Forwarded-For
...
...
vz/azbyka/createbytask.sh
View file @
51959d36
#!/bin/bash
-x
#!/bin/bash
fatal
()
{
...
...
@@ -102,19 +102,18 @@ st()
}
if
[
!
-s
"apache/
$AUSER
.conf"
]
;
then
cat
/var/lib/vz/root/
$VEIDORIG
/etc/httpd2/conf/sites-enabled/
$ACONF
.conf
| st
tee
/tmp
/
$ACONF
.conf
cat
/var/lib/vz/root/
$VEIDORIG
/etc/httpd2/conf/sites-enabled/
$ACONF
.conf
>
apache
/
$ACONF
.conf
fi
[
-s
apache/
$AUSER
.conf
]
||
fatal
"Empty
/tmp
/
$AUSER
.conf"
cat
apache/
$AUSER
.conf | st
tee
/tmp/
$AUSER
.conf
[
-s
apache/
$AUSER
.conf
]
||
fatal
"Empty
apache
/
$AUSER
.conf"
cat
apache/
$AUSER
.conf | st
tee
/tmp/
$AUSER
.conf
>
/dev/null
# /etc/httpd2/conf/sites-enabled/$AUSER.conf || fatal
hostserver
cat
/var/lib/vz/root/
$VEIDORIG
/etc/httpd2/conf/include/prepend.php | st
tee
/tmp/prepend.php
# etc/httpd2/conf/include/prepend.php || fatal
hostserver
cat
/var/lib/vz/root/
$VEIDORIG
/etc/httpd2/conf/include/prepend.php | st
tee
/tmp/prepend.php
>
/dev/null
st
test
-s
/tmp/prepend.php
||
fatal
"Empty prepend.php"
# copy task into
ATASK
=
/tmp/
$(
basename
$TASK
)
(
[
-s
"base.task"
]
&&
cat
base.task
;
echo
;
cat
$TASK
;
)
| st
tee
$ATASK
(
[
-s
"base.task"
]
&&
cat
base.task
;
echo
;
cat
$TASK
;
)
| st
tee
$ATASK
>
/dev/null
# if we detected it before
echo
"NAME=
$NAME
"
| st
tee
-a
$ATASK
...
...
@@ -132,6 +131,6 @@ echo "AGROUPID=$agroupid" | st tee -a $ATASK
#echo "WEBMASTER=$(vzctl exec $VEIDORIG id -g $AUSER)" | st tee -a $ATASK
cat
createbytask.int.sh | st
tee
/tmp/createbytask.int.sh
cat
createbytask.int.sh | st
tee
/tmp/createbytask.int.sh
>
/dev/null
st
chmod
0755 /tmp/createbytask.int.sh
st /tmp/createbytask.int.sh
$ATASK
||
fatal
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