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
etersoft
eepm
Commits
b1a0ca36
Commit
b1a0ca36
authored
Dec 13, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to M60P as 1.1.2-alt0.M60P.1 (with rpmbph script)
parents
41047965
ff094632
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
16 deletions
+38
-16
serv
bash_completion/serv
+3
-2
serv-start
bin/serv-start
+6
-3
serv-stop
bin/serv-stop
+6
-3
serv-try_restart
bin/serv-try_restart
+8
-5
serv-usage
bin/serv-usage
+7
-0
eepm.spec
eepm.spec
+8
-3
No files found.
bash_completion/serv
View file @
b1a0ca36
...
...
@@ -5,13 +5,14 @@
#
_service_list()
{
COMPREPLY=( $( serv list-all 2>/dev/null ) )
COMPREPLY=( $( serv list-all 2>/dev/null
; echo "list list-all list-startup"
) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
}
_service_usage_list()
{
COMPREPLY=( $( compgen -W '`serv ${prev##*/} 2>/dev/null | sed -e "y/|/ /" -ne "s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" `' -- "$cur" ) )
local USLIST=$(serv ${prev##*/} usage 2>/dev/null | sed -e "y/|/ /" -ne "s/^.*\(u\|U\|msg_u\)sage.*{\(.*\)}.*$/\2/p")
COMPREPLY=( $( compgen -W '$USLIST' -- "$cur" ) )
}
...
...
bin/serv-start
View file @
b1a0ca36
...
...
@@ -20,15 +20,18 @@
# Start service
serv_start
()
{
local
SERVICE
=
"
$1
"
shift
case
$SERVICETYPE
in
service-chkconfig|service-upstart
)
sudocmd service
$
1
start
sudocmd service
$
SERVICE
start
"
$@
"
;;
service-initd|service-update
)
sudocmd /etc/init.d/
$
1
start
sudocmd /etc/init.d/
$
SERVICE
start
"
$@
"
;;
systemd
)
sudocmd systemctl start
$1
sudocmd systemctl start
"
$SERVICE
"
"
$@
"
;;
*
)
fatal
"Do not known command for
$SERVICETYPE
"
...
...
bin/serv-stop
View file @
b1a0ca36
...
...
@@ -20,15 +20,18 @@
# Stop service
serv_stop
()
{
local
SERVICE
=
"
$1
"
shift
case
$SERVICETYPE
in
service-chkconfig|service-upstart
)
sudocmd service
$
1
stop
sudocmd service
$
SERVICE
stop
"
$@
"
;;
service-initd|service-update
)
sudocmd /etc/init.d/
$
1
stop
sudocmd /etc/init.d/
$
SERVICE
stop
"
$@
"
;;
systemd
)
sudocmd systemctl stop
$
1
sudocmd systemctl stop
$
SERVICE
"
$@
"
;;
*
)
fatal
"Do not known command for
$SERVICETYPE
"
...
...
bin/serv-try_restart
View file @
b1a0ca36
...
...
@@ -22,17 +22,20 @@ load_helper serv-status
# Try restart service (if it is running)
serv_try_restart
()
{
local
SERVICE
=
"
$1
"
shift
case
$SERVICETYPE
in
service-chkconfig|service-upstart
)
is_service_running
$
1
||
return
0
sudocmd service
$
1
restart
is_service_running
$
SERVICE
||
return
0
sudocmd service
$
SERVICE
restart
"
$@
"
;;
service-initd|service-update
)
is_service_running
$
1
||
return
0
sudocmd /etc/init.d/
$
1
restart
is_service_running
$
SERVICE
||
return
0
sudocmd /etc/init.d/
$
SERVICE
restart
"
$@
"
;;
systemd
)
sudocmd systemctl try-restart
$
1
sudocmd systemctl try-restart
$
SERVICE
"
$@
"
;;
*
)
fatal
"Do not known command for
$SERVICETYPE
"
...
...
bin/serv-usage
View file @
b1a0ca36
...
...
@@ -17,6 +17,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
_print_additional_usage
()
{
echo
"serv addition usage: {on|off|try-restart|usage}"
}
# Print usage of the service
serv_usage
()
{
...
...
@@ -40,4 +45,6 @@ serv_usage()
;;
esac
_print_additional_usage
}
eepm.spec
View file @
b1a0ca36
# This spec is backported to ALTLinux p6 automatically by rpmbph script. Do not edit it.
#
Name: eepm
Version: 1.1.
1
Version: 1.1.
2
Release: alt0.M60P.1
Summary: Etersoft EPM package manager
...
...
@@ -39,7 +39,7 @@ See detailed description here: http://wiki.etersoft.ru/EPM
%setup
%build
%__subst "s|@VERSION@|%version-%release|g" bin/epm
%__subst "s|@VERSION@|%version-%release|g" bin/epm
bin/serv
%install
# install to datadir and so on
...
...
@@ -60,9 +60,14 @@ install -m 0644 bash_completion/serv %buildroot%_sysconfdir/bash_completion.d/se
%_sysconfdir/bash_completion.d/serv
%changelog
* T
ue Dec 11 2012 Vitaly Lipatov <lav@altlinux.ru> 1.1.1
-alt0.M60P.1
* T
hu Dec 13 2012 Vitaly Lipatov <lav@altlinux.ru> 1.1.2
-alt0.M60P.1
- backport to ALTLinux p6 (by rpmbph script)
* Thu Dec 13 2012 Vitaly Lipatov <lav@altlinux.ru> 1.1.2-alt1
- serv: allow additional params for start, stop and try_restart
- spec: replace @VERSION@ in serv too
- add print our commands to bash completion, to print usage
* Mon Dec 10 2012 Vitaly Lipatov <lav@altlinux.ru> 1.1.1-alt1
- serv: add usage command
- add README
...
...
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