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
fbe06718
Commit
fbe06718
authored
Oct 02, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed
parent
c0ca141c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
16 deletions
+57
-16
epm.sh
packed/epm.sh
+6
-6
serv.sh
packed/serv.sh
+51
-10
No files found.
packed/epm.sh
View file @
fbe06718
...
...
@@ -275,7 +275,7 @@ set_sudo()
if
which
sudo
>
/dev/null 2>/dev/null
;
then
SUDO
=
"sudo --"
# check for < 1.7 version which do not support -- (and --help possible too)
sudo
-h
|
grep
-q
" --"
||
SUDO
=
"sudo"
sudo
-h
2>/dev/null
|
grep
-q
" --"
||
SUDO
=
"sudo"
return
fi
...
...
@@ -508,7 +508,7 @@ is_active_systemd()
[
-d
"
$SYSTEMD_CGROUP_DIR
"
]
||
return
a
=
mountpoint
-q
"
$SYSTEMD_CGROUP_DIR
"
||
return
# some hack
p
idof systemd
>
/dev/null
p
s ax |
grep
-q
'[s]ystemd'
>
/dev/null
}
# File bin/epm-addrepo:
...
...
@@ -3108,7 +3108,7 @@ __epm_query_name()
CMD
=
"conary query"
;;
homebrew
)
warning
"fix query"
docmd brew info
"
$1
"
>
/dev/null 2>/dev/null
&&
echo
"
$1
"
&&
return
return
1
;;
# TODO: need to print name if exists
...
...
@@ -4687,7 +4687,7 @@ __query_package_hl_url()
# http://petstore.swagger.io/?url=http://packages.altlinux.org/api/docs
epm assure curl
||
return
1
showcmd curl
"
$PAOAPI
/srpms/
$1
"
curl
-s
--header
"Accept: application/json"
"
$PAOAPI
/srpms/
$1
"
|
grep
'"url"'
|
sed
-e
's|.*"url":"||g'
|
sed
-e
's|".*||g'
a
=
curl
-s
--header
"Accept: application/json"
"
$PAOAPI
/srpms/
$1
"
|
grep
'"url"'
|
sed
-e
's|.*"url":"||g'
|
sed
-e
's|".*||g'
return
0
;;
esac
...
...
@@ -5519,7 +5519,7 @@ $(get_help HELPOPT)
print_version
()
{
echo
"EPM package manager version 1.9.
3
"
echo
"EPM package manager version 1.9.
6
"
echo
"Running on
$(
$DISTRVENDOR
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Copyright (c) Etersoft 2012-2016"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
@@ -5858,7 +5858,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
if
[
-z
"
$epm_cmd
"
]
;
then
print_version
echo
fatal
"Run
$ $PROGNAME
--help for get help"
fatal
"
Unknown command
$@
.
Run
$ $PROGNAME
--help for get help"
fi
# Use eatmydata for write specific operations
...
...
packed/serv.sh
View file @
fbe06718
...
...
@@ -268,7 +268,7 @@ set_sudo()
if
which
sudo
>
/dev/null 2>/dev/null
;
then
SUDO
=
"sudo --"
# check for < 1.7 version which do not support -- (and --help possible too)
sudo
-h
|
grep
-q
" --"
||
SUDO
=
"sudo"
sudo
-h
2>/dev/null
|
grep
-q
" --"
||
SUDO
=
"sudo"
return
fi
...
...
@@ -501,7 +501,7 @@ is_active_systemd()
[
-d
"
$SYSTEMD_CGROUP_DIR
"
]
||
return
a
=
mountpoint
-q
"
$SYSTEMD_CGROUP_DIR
"
||
return
# some hack
p
idof systemd
>
/dev/null
p
s ax |
grep
-q
'[s]ystemd'
>
/dev/null
}
# File bin/serv-common:
...
...
@@ -636,11 +636,6 @@ serv_list()
for
i
in
$(
serv_list_all
)
;
do
is_service_running
$i
>
/dev/null
&&
echo
$i
done
# TODO: только запущенные
if
[
-n
"
$ANYSERVICE
"
]
;
then
sudocmd
$ANYSERVICE
list
return
fi
;;
esac
}
...
...
@@ -655,7 +650,7 @@ serv_list_all()
sudocmd chkconfig
--list
|
cut
-f1
if
[
-n
"
$ANYSERVICE
"
]
;
then
sudocmd anyservice list
sudocmd anyservice
--quiet
list
return
fi
;;
...
...
@@ -685,6 +680,49 @@ serv_list_startup()
esac
}
# File bin/serv-log:
__serv_log_altlinux
()
{
local
SERVICE
=
"
$1
"
case
"
$SERVICE
"
in
postfix
)
sudocmd
tail
-f
/var/log/mail/all /var/log/mail/errors
;;
cups
)
sudocmd
tail
-f
/var/log/cups/access_log /var/log/cups/error_log
;;
fail2ban
)
sudocmd
tail
-f
/var/log/
$SERVICE
.log
;;
*
)
fatal
"Have no suitable for
$SERVICE
service"
;;
esac
}
serv_log
()
{
local
SERVICE
=
"
$1
"
shift
case
$SERVICETYPE
in
systemd
)
sudocmd journalctl
-f
-b
-u
"
$SERVICE
"
"
$@
"
;;
*
)
case
$DISTRNAME
in
ALTLinux
)
__serv_log_altlinux
"
$SERVICE
"
return
;;
*
)
fatal
"Have no suitable for
$DISTRNAME
command for
$SERVICETYPE
"
;;
esac
esac
}
# File bin/serv-print:
serv_print
()
...
...
@@ -1498,8 +1536,8 @@ $(get_help HELPOPT)
print_version
()
{
echo
"Service manager version 1.9.
3
"
echo
"Running on
$(
$DISTRVENDOR
)
"
echo
"Service manager version 1.9.
6
"
echo
"Running on
$(
$DISTRVENDOR
)
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012, 2013, 2016"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
}
...
...
@@ -1570,6 +1608,9 @@ check_command()
serv_cmd
=
print
withoutservicename
=
1
;;
log|journal
)
# HELPCMD: print log for the service
serv_cmd
=
log
;;
*
)
return
1
;;
...
...
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