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
15a732c2
Commit
15a732c2
authored
Oct 23, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve createbytask*
parent
102e86ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
6 deletions
+37
-6
createbytask.int.sh
vz/azbyka/createbytask.int.sh
+18
-2
createbytask.sh
vz/azbyka/createbytask.sh
+13
-4
functions
vz/azbyka/functions
+6
-0
No files found.
vz/azbyka/createbytask.int.sh
View file @
15a732c2
...
...
@@ -200,16 +200,27 @@ tune_php()
tune_apache2
()
{
local
i
# See https://bugzilla.altlinux.org/show_bug.cgi?id=39115
local
F
=
/etc/httpd2/conf/mods-start.d/090-etersoft-default.conf
truncate
$F
for
i
in
$A2ENMOD
;
do
docmd a2enmod
$i
echo
"
$i
=yes"
>>
$F
done
for
i
in
$A2DISMOD
;
do
for
i
in
$A2DISMOD
;
do
docmd a2dismod
$i
echo
"
$i
=no"
>>
$F
done
F
=
/etc/httpd2/conf/extra-start.d/090-etersoft-default.conf
truncate
$F
for
i
in
httpd-multilang-errordoc
;
do
docmd a2disextra
$i
echo
"
$i
=no"
>>
$F
done
cat
<<
EOF
> /etc/httpd2/conf/mods-available/remoteip.conf
...
...
@@ -218,7 +229,8 @@ cat <<EOF > /etc/httpd2/conf/mods-available/remoteip.conf
RemoteIPInternalProxy
$NGINXIP
/32
</IfModule>
EOF
ln
-sr
/etc/httpd2/conf/mods-available/remoteip.conf /etc/httpd2/conf/mods-enabled/remoteip.conf
[
-f
/etc/httpd2/conf/mods-enabled/remoteip.conf
]
||
ln
-sr
/etc/httpd2/conf/mods-available/remoteip.conf /etc/httpd2/conf/mods-enabled/remoteip.conf
cp
/tmp/prepend.php /etc/httpd2/conf/include/prepend.php
||
fatal
# TODO
...
...
@@ -286,11 +298,14 @@ EOF
a2dissite 000-default
a2dissite ports_all
serv httpd2 restart
||
fatal
}
tune_apache2_mediawiki
()
{
local
i
# Note: A2ENMOD/A2DISMOD in tune_apache2
for
i
in
mod_php7 status remoteip setenvif rewrite session include
;
do
docmd a2enmod
$i
...
...
@@ -403,3 +418,4 @@ if [ -n "$AUSERID" ] ; then
fi
epm clean
vz/azbyka/createbytask.sh
View file @
15a732c2
...
...
@@ -10,7 +10,16 @@ tune_yandex_mirror()
sed
-i
-e
's|^#\(rpm \[p8\] http://mirror.yandex.ru/altlinux p8\)|\1|'
$APTSDIR
/yandex.list
||
return
}
load_config
"
$1
"
TASKFILE
=
"
$1
"
if
!
echo
"
$TASKFILE
"
|
grep
-q
ves/
;
then
TASKFILE
=
ves/
$TASKFILE
.task
[
-s
$TASKFILE
]
||
fatal
"Can't find
$TASKFILE
(originally
$1
)"
fi
load_config
"
$TASKFILE
"
FORCE
=
''
[
"
$2
"
=
"--force"
]
&&
FORCE
=
"--force-recreate"
# TODO
# links:
...
...
@@ -58,10 +67,10 @@ EOF
DOCKID
=
$ACONF
#evz destroy $DOCKID
#docker-compose -f composers/docker-compose.yml -p $BASENAME create $DOCKID || fatal
doc
ker-compose
-f
composers/docker-compose.yml
-p
$BASENAME
up
--build
--no-start
$DOCKID
||
fatal
doc
md docker-compose
-f
composers/docker-compose.yml
-p
$BASENAME
up
--build
$FORCE
--no-start
$DOCKID
||
fatal
#cd -
docker start
$DOCKID
||
fatal
doc
md doc
ker start
$DOCKID
||
fatal
#VEIP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DOCKID)
else
if
!
vzlist
-a
|
grep
"
$VEIP
"
;
then
...
...
@@ -189,6 +198,6 @@ fi
cat
createbytask.int.sh | st
tee
/tmp/createbytask.int.sh
>
/dev/null
st
chmod
0755 /tmp/createbytask.int.sh
st bash /tmp/createbytask.int.sh
$ATASK
||
fatal
st bash
-x
/tmp/createbytask.int.sh
$ATASK
||
fatal
st epm clean
vz/azbyka/functions
View file @
15a732c2
...
...
@@ -6,6 +6,12 @@ fatal()
exit
1
}
docmd
()
{
echo
"#
$*
"
"
$@
"
}
assure
()
{
[
-n
"
$1
"
]
||
fatal
"empty"
...
...
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