Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nurlan
eepm
Commits
c868aa10
Commit
c868aa10
authored
Jun 29, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.19.1
parent
27d13bd7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+30
-4
No files found.
packed/epm.sh
View file @
c868aa10
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
c868aa10
...
@@ -73,8 +73,8 @@ check_tty()
...
@@ -73,8 +73,8 @@ check_tty()
check_core_commands
check_core_commands
#
egrep
from busybox may not --color
#
grep -E
from busybox may not --color
#
egrep
from MacOS print help to stderr
#
grep -E
from MacOS print help to stderr
if
grep
-E
--help
2>&1 |
grep
-q
--
"--color"
;
then
if
grep
-E
--help
2>&1 |
grep
-q
--
"--color"
;
then
export
EGREPCOLOR
=
"--color"
export
EGREPCOLOR
=
"--color"
fi
fi
...
@@ -1996,6 +1996,10 @@ get_virt()
...
@@ -1996,6 +1996,10 @@ get_virt()
echo
"xen"
&&
return
echo
"xen"
&&
return
fi
fi
if
lscpu |
grep
"Hypervisor vendor:"
|
grep
-q
"KVM"
;
then
echo
"kvm"
&&
return
fi
echo
"(unknown)"
echo
"(unknown)"
# TODO: check for openvz
# TODO: check for openvz
}
}
...
@@ -2580,19 +2584,25 @@ has_space()
...
@@ -2580,19 +2584,25 @@ has_space()
list
()
list
()
{
{
local
i
local
i
set
-f
for
i
in
$@
;
do
for
i
in
$@
;
do
echo
"
$i
"
echo
"
$i
"
done
done
set
+f
}
}
count
()
count
()
{
{
set
-f
list
$@
|
wc
-l
list
$@
|
wc
-l
set
+f
}
}
union
()
union
()
{
{
set
-f
strip_spaces
$(
list
$@
|
sort
-u
)
strip_spaces
$(
list
$@
|
sort
-u
)
set
+f
}
}
intersection
()
intersection
()
...
@@ -2624,7 +2634,7 @@ match()
...
@@ -2624,7 +2634,7 @@ match()
{
{
local
wd
=
"
$1
"
local
wd
=
"
$1
"
shift
shift
echo
"
$*
"
|
egrep
-q
--
"
$wd
"
echo
"
$*
"
|
grep
-E
-q
--
"
$wd
"
}
}
...
@@ -2633,9 +2643,11 @@ reg_remove()
...
@@ -2633,9 +2643,11 @@ reg_remove()
{
{
local
i
local
i
local
RES
=
local
RES
=
set
-f
for
i
in
$2
;
do
for
i
in
$2
;
do
echo
"
$i
"
|
grep
-q
"^
$1
$"
||
RES
=
"
$RES
$i
"
echo
"
$i
"
|
grep
-q
"^
$1
$"
||
RES
=
"
$RES
$i
"
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
...
@@ -2644,9 +2656,11 @@ reg_wordremove()
...
@@ -2644,9 +2656,11 @@ reg_wordremove()
{
{
local
i
local
i
local
RES
=
""
local
RES
=
""
set
-f
for
i
in
$2
;
do
for
i
in
$2
;
do
echo
"
$i
"
|
grep
-q
-w
"
$1
"
||
RES
=
"
$RES
$i
"
echo
"
$i
"
|
grep
-q
-w
"
$1
"
||
RES
=
"
$RES
$i
"
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
...
@@ -2667,9 +2681,11 @@ exclude()
...
@@ -2667,9 +2681,11 @@ exclude()
{
{
local
i
local
i
local
RES
=
"
$2
"
local
RES
=
"
$2
"
set
-f
for
i
in
$1
;
do
for
i
in
$1
;
do
RES
=
"
$(
reg_rqremove
"
$i
"
"
$RES
"
)
"
RES
=
"
$(
reg_rqremove
"
$i
"
"
$RES
"
)
"
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
...
@@ -2678,9 +2694,11 @@ reg_exclude()
...
@@ -2678,9 +2694,11 @@ reg_exclude()
{
{
local
i
local
i
local
RES
=
"
$2
"
local
RES
=
"
$2
"
set
-f
for
i
in
$1
;
do
for
i
in
$1
;
do
RES
=
"
$(
reg_remove
"
$i
"
"
$RES
"
)
"
RES
=
"
$(
reg_remove
"
$i
"
"
$RES
"
)
"
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
...
@@ -2689,18 +2707,22 @@ reg_wordexclude()
...
@@ -2689,18 +2707,22 @@ reg_wordexclude()
{
{
local
i
local
i
local
RES
=
"
$2
"
local
RES
=
"
$2
"
set
-f
for
i
in
$1
;
do
for
i
in
$1
;
do
RES
=
$(
reg_wordremove
"
$i
"
"
$RES
"
)
RES
=
$(
reg_wordremove
"
$i
"
"
$RES
"
)
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
if_contain
()
if_contain
()
{
{
local
i
local
i
set
-f
for
i
in
$2
;
do
for
i
in
$2
;
do
[
"
$i
"
=
"
$1
"
]
&&
return
[
"
$i
"
=
"
$1
"
]
&&
return
done
done
set
+f
return
1
return
1
}
}
...
@@ -2708,12 +2730,14 @@ difference()
...
@@ -2708,12 +2730,14 @@ difference()
{
{
local
RES
=
""
local
RES
=
""
local
i
local
i
set
-f
for
i
in
$1
;
do
for
i
in
$1
;
do
if_contain
$i
"
$2
"
||
RES
=
"
$RES
$i
"
if_contain
$i
"
$2
"
||
RES
=
"
$RES
$i
"
done
done
for
i
in
$2
;
do
for
i
in
$2
;
do
if_contain
$i
"
$1
"
||
RES
=
"
$RES
$i
"
if_contain
$i
"
$1
"
||
RES
=
"
$RES
$i
"
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
...
@@ -2724,9 +2748,11 @@ reg_include()
...
@@ -2724,9 +2748,11 @@ reg_include()
{
{
local
i
local
i
local
RES
=
""
local
RES
=
""
set
-f
for
i
in
$2
;
do
for
i
in
$2
;
do
echo
"
$i
"
|
grep
-q
-w
"
$1
"
&&
RES
=
"
$RES
$i
"
echo
"
$i
"
|
grep
-q
-w
"
$1
"
&&
RES
=
"
$RES
$i
"
done
done
set
+f
strip_spaces
"
$RES
"
strip_spaces
"
$RES
"
}
}
...
@@ -3137,7 +3163,7 @@ print_version()
...
@@ -3137,7 +3163,7 @@ print_version()
local
on_text
=
"(host system)"
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version 3.1
8.6
https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.1
9.1
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
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