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
Vladislav
eepm
Commits
89b43b7e
Commit
89b43b7e
authored
Oct 06, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to p8 as 1.9.6-alt0.M80P.1 (with rpmbph script)
parents
b3a714f1
c0ca141c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
11 deletions
+78
-11
epm
bin/epm
+1
-1
epm-sh-functions
bin/epm-sh-functions
+2
-2
serv
bin/serv
+3
-0
serv-list
bin/serv-list
+0
-5
serv-list_all
bin/serv-list_all
+1
-1
serv-log
bin/serv-log
+59
-0
eepm.spec
eepm.spec
+12
-2
No files found.
bin/epm
View file @
89b43b7e
...
@@ -402,7 +402,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
...
@@ -402,7 +402,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
if
[
-z
"
$epm_cmd
"
]
;
then
if
[
-z
"
$epm_cmd
"
]
;
then
print_version
print_version
echo
echo
fatal
"Run
$ $PROGNAME
--help for get help"
fatal
"
Unknown command
$@
.
Run
$ $PROGNAME
--help for get help"
fi
fi
# Use eatmydata for write specific operations
# Use eatmydata for write specific operations
...
...
bin/epm-sh-functions
View file @
89b43b7e
...
@@ -271,7 +271,7 @@ set_sudo()
...
@@ -271,7 +271,7 @@ set_sudo()
if
which
sudo
>
/dev/null 2>/dev/null
;
then
if
which
sudo
>
/dev/null 2>/dev/null
;
then
SUDO
=
"sudo --"
SUDO
=
"sudo --"
# check for < 1.7 version which do not support -- (and --help possible too)
# 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
return
fi
fi
...
@@ -516,5 +516,5 @@ is_active_systemd()
...
@@ -516,5 +516,5 @@ is_active_systemd()
[
-d
"
$SYSTEMD_CGROUP_DIR
"
]
||
return
[
-d
"
$SYSTEMD_CGROUP_DIR
"
]
||
return
a
=
mountpoint
-q
"
$SYSTEMD_CGROUP_DIR
"
||
return
a
=
mountpoint
-q
"
$SYSTEMD_CGROUP_DIR
"
||
return
# some hack
# some hack
ps ax |
grep
-q
systemd
>
/dev/null
ps ax |
grep
-q
'[s]ystemd'
>
/dev/null
}
}
bin/serv
View file @
89b43b7e
...
@@ -201,6 +201,9 @@ check_command()
...
@@ -201,6 +201,9 @@ check_command()
serv_cmd
=
print
serv_cmd
=
print
withoutservicename
=
1
withoutservicename
=
1
;;
;;
log|journal
)
# HELPCMD: print log for the service
serv_cmd
=
log
;;
*
)
*
)
return
1
return
1
;;
;;
...
...
bin/serv-list
View file @
89b43b7e
...
@@ -38,11 +38,6 @@ serv_list()
...
@@ -38,11 +38,6 @@ serv_list()
for
i
in
$(
serv_list_all
)
;
do
for
i
in
$(
serv_list_all
)
;
do
is_service_running
$i
>
/dev/null
&&
echo
$i
is_service_running
$i
>
/dev/null
&&
echo
$i
done
done
# TODO: только запущенные
if
[
-n
"
$ANYSERVICE
"
]
;
then
sudocmd
$ANYSERVICE
list
return
fi
;;
;;
esac
esac
}
}
bin/serv-list_all
View file @
89b43b7e
...
@@ -26,7 +26,7 @@ serv_list_all()
...
@@ -26,7 +26,7 @@ serv_list_all()
sudocmd chkconfig
--list
|
cut
-f1
sudocmd chkconfig
--list
|
cut
-f1
if
[
-n
"
$ANYSERVICE
"
]
;
then
if
[
-n
"
$ANYSERVICE
"
]
;
then
sudocmd anyservice list
sudocmd anyservice
--quiet
list
return
return
fi
fi
;;
;;
...
...
bin/serv-log
0 → 100644
View file @
89b43b7e
#!/bin/sh
#
# Copyright (C) 2016 Etersoft
# Copyright (C) 2016 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__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
}
eepm.spec
View file @
89b43b7e
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
#
#
Name: eepm
Name: eepm
Version: 1.9.
4
Version: 1.9.
6
Release: alt0.M80P.1
Release: alt0.M80P.1
Summary: Etersoft EPM package manager
Summary: Etersoft EPM package manager
...
@@ -68,9 +68,19 @@ chmod a+x %buildroot%_datadir/%name/tools_*
...
@@ -68,9 +68,19 @@ chmod a+x %buildroot%_datadir/%name/tools_*
%_sysconfdir/bash_completion.d/cerv
%_sysconfdir/bash_completion.d/cerv
%changelog
%changelog
*
Fri Sep 23 2016 Vitaly Lipatov <lav@altlinux.ru> 1.9.4
-alt0.M80P.1
*
Thu Oct 06 2016 Vitaly Lipatov <lav@altlinux.ru> 1.9.6
-alt0.M80P.1
- backport to ALTLinux p8 (by rpmbph script)
- backport to ALTLinux p8 (by rpmbph script)
* Sun Oct 02 2016 Vitaly Lipatov <lav@altlinux.ru> 1.9.6-alt1
- epm: improve message about incorrect command
- workaround for sudo -h prints first line in stderr
- example support for service SERVICE log command
* Fri Sep 23 2016 Vitaly Lipatov <lav@altlinux.ru> 1.9.5-alt1
- fix systemd detection
- initial log command support
- fix anyservice list (need anyservice 0.5 or above)
* Fri Sep 23 2016 Vitaly Lipatov <lav@altlinux.ru> 1.9.4-alt1
* Fri Sep 23 2016 Vitaly Lipatov <lav@altlinux.ru> 1.9.4-alt1
- distr_info: fix checking on MacOS
- distr_info: fix checking on MacOS
- brew fixes
- brew fixes
...
...
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