Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
10abf613
Commit
10abf613
authored
Jun 04, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2115 from tmonk42/exit_codes
fixing up init script exit codes
parents
83279604
fcba6289
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
packaging/deb/init.d/grafana-server
+7
-7
packaging/rpm/init.d/grafana-server
+14
-7
No files found.
packaging/deb/init.d/grafana-server
View file @
10abf613
...
...
@@ -38,7 +38,12 @@ DAEMON=/usr/sbin/$NAME
if
[
`
id
-u
`
-ne
0
]
;
then
echo
"You need root privileges to run this script"
exit
1
exit
4
fi
if
[
!
-x
$DAEMON
]
;
then
echo
"Program not installed or not executable"
exit
5
fi
.
/lib/lsb/init-functions
...
...
@@ -54,9 +59,6 @@ fi
DAEMON_OPTS
=
"--pidfile=
${
PID_FILE
}
--config=
${
CONF_FILE
}
cfg:default.paths.data=
${
DATA_DIR
}
cfg:default.paths.logs=
${
LOG_DIR
}
"
# Check DAEMON exists
test
-x
$DAEMON
||
exit
0
case
"
$1
"
in
start
)
...
...
@@ -137,8 +139,6 @@ case "$1" in
;;
*
)
log_success_msg
"Usage:
$0
{start|stop|restart|force-reload|status}"
exit
1
exit
3
;;
esac
exit
0
packaging/rpm/init.d/grafana-server
View file @
10abf613
...
...
@@ -35,6 +35,16 @@ MAX_OPEN_FILES=10000
PID_FILE
=
/var/run/
$NAME
.pid
DAEMON
=
/usr/sbin/
$NAME
if
[
`
id
-u
`
-ne
0
]
;
then
echo
"You need root privileges to run this script"
exit
4
fi
if
[
!
-x
$DAEMON
]
;
then
echo
"Program not installed or not executable"
exit
5
fi
#
# init.d / servicectl compatibility (openSUSE)
#
...
...
@@ -55,9 +65,6 @@ fi
DAEMON_OPTS
=
"--pidfile=
${
PID_FILE
}
--config=
${
CONF_FILE
}
cfg:default.paths.data=
${
DATA_DIR
}
cfg:default.paths.logs=
${
LOG_DIR
}
"
# Check DAEMON exists
test
-x
$DAEMON
||
exit
0
function
isRunning
()
{
status
-p
$PID_FILE
$NAME
>
/dev/null 2>&1
}
...
...
@@ -69,7 +76,7 @@ case "$1" in
isRunning
if
[
$?
-eq
0
]
;
then
echo
"Already running."
exit
2
exit
0
fi
# Prepare environment
...
...
@@ -90,7 +97,7 @@ case "$1" in
# check if pid file has been written two
if
!
[[
-s
$PID_FILE
]]
;
then
echo
"FAILED"
exit
3
exit
1
fi
i
=
0
timeout
=
10
...
...
@@ -101,7 +108,7 @@ case "$1" in
i
=
$((
$i
+
1
))
if
[
$i
-gt
$timeout
]
;
then
echo
"FAILED"
exit
4
exit
1
fi
done
fi
...
...
@@ -141,6 +148,6 @@ case "$1" in
;;
*
)
echo
-n
"Usage:
$0
{start|stop|restart|force-reload|status}"
exit
1
exit
3
;;
esac
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