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
4d507e35
Commit
4d507e35
authored
Jun 19, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
serv: fix without param checking
parent
937ca1b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
serv
bin/serv
+6
-2
No files found.
bin/serv
View file @
4d507e35
...
...
@@ -141,7 +141,7 @@ show_command_only=
serv_cmd
=
service_name
=
params
=
withoutservicename
=
check_command
()
{
...
...
@@ -154,6 +154,7 @@ check_command()
;;
usage
)
# HELPCMD: print out usage of the service
serv_cmd
=
usage
withoutservicename
=
1
;;
#restart) # HELPCMD: restart service
#reload) # HELPCMD: reload service
...
...
@@ -168,12 +169,15 @@ check_command()
;;
list
)
# HELPCMD: list running services
serv_cmd
=
list
withoutservicename
=
1
;;
list-all
)
# HELPCMD: list all available services
serv_cmd
=
list_all
withoutservicename
=
1
;;
list-startup
)
# HELPCMD: list all services to run on startup
serv_cmd
=
list_startup
withoutservicename
=
1
;;
on|enable
)
# HELPCMD: add service to run on startup and start it now
serv_cmd
=
enable
...
...
@@ -229,7 +233,7 @@ echover "service: $service_name"
echover
"command:
$serv_cmd
"
# Just printout help if run without args
if
[
"
$serv_cmd
"
!=
"list"
]
&&
[
"
$serv_cmd
"
!=
"list_all
"
]
&&
[
-z
"
$service_name
"
]
;
then
if
[
-z
"
$withoutservicename
"
]
&&
[
-z
"
$service_name
"
]
;
then
print_version
echo
fatal
"Run
$ $progname
--help for get help"
...
...
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