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
b3878d1b
Commit
b3878d1b
authored
Dec 07, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
createbytask.int: small improvements
parent
3f60d10a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
createbytask.int.sh
vz/azbyka/createbytask.int.sh
+10
-6
createbytask.sh
vz/azbyka/createbytask.sh
+2
-0
No files found.
vz/azbyka/createbytask.int.sh
View file @
b3878d1b
...
...
@@ -38,7 +38,12 @@ rewrite_if_changed()
tune_hosts
()
{
cat
<<
EOF
>>/etc/hosts.tmpCB
cat
<<
EOF
>/etc/hosts.tmpCB
127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
$VEIP
$AUSER
.site.azbyka.ru
$AUSER
# Azbyka's hosts
192.168.3.188 memcached.azbyka
192.168.3.185 sphinx.azbyka
...
...
@@ -50,14 +55,13 @@ cat <<EOF >>/etc/hosts.tmpCB
192.168.3.190 mariadb
192.168.3.190 mariadb.
$AUSER
EOF
rewrite_if_changed /etc/hosts.tmpCB /etc/hosts
&&
update_chrooted_conf
rewrite_if_changed /etc/hosts.tmpCB /etc/hosts
&&
update_chrooted conf
}
tune_logrotate
()
{
cat
<<
EOF
>
>/etc/logrotate.d/apache-home-local
cat
<<
EOF
>
/etc/logrotate.d/apache-home-local.tmpCB
/home/*/log/*.log {
missingok
rotate 3
...
...
@@ -72,7 +76,7 @@ cat <<EOF >>/etc/logrotate.d/apache-home-local
endscript
}
EOF
rewrite_if_changed /etc/logrotate.d/apache-home-local.tmpCB /etc/logrotate.d/apache-home-local
}
tune_monit
()
...
...
@@ -204,7 +208,7 @@ groupadd $AUSER -g $AGROUPID
useradd
-M
$AUSER
-u
$AUSERID
-g
$AGROUPID
#|| fatal
# locales
echo
"%_install_langs ru
_RU en_US
"
>
/etc/rpm/macros
echo
"%_install_langs ru
:en:C
"
>
/etc/rpm/macros
epmi
--auto
--skip-installed
glibc-locales
tune_hosts
...
...
vz/azbyka/createbytask.sh
View file @
b3878d1b
...
...
@@ -125,6 +125,7 @@ echo "AUSER=$AUSER" | st tee -a $ATASK
echo
"ACONF=
$ACONF
"
| st
tee
-a
$ATASK
echo
"ADOMAIN=
$ADOMAIN
"
| st
tee
-a
$ATASK
echo
"PKGINSTALL='
$PKGINSTALL
'"
| st
tee
-a
$ATASK
echo
"VEIP=
$VEIP
"
| st
tee
-a
$ATASK
auserid
=
$(
hostserver vzctl
exec
$VEIDORIG
id
-u
$AUSER
)
[
-n
"
$auserid
"
]
||
fatal
"can't get user id"
...
...
@@ -134,6 +135,7 @@ agroupid=$(hostserver vzctl exec $VEIDORIG id -g $AUSER)
[
-n
"
$agroupid
"
]
||
fatal
"can't get group id"
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
>
/dev/null
...
...
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