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
c4424844
Commit
c4424844
authored
Apr 10, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to rpm package
parent
d32c03ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
24 deletions
+9
-24
docker/rpmtest/Dockerfile
+2
-2
packaging/rpm/init.d/grafana-server
+7
-22
No files found.
docker/rpmtest/Dockerfile
View file @
c4424844
FROM
centos:
7.0
FROM
centos:
latest
RUN
yum install
-y
initscripts
ADD
* /tmp/
ADD
*
.rpm
/tmp/
packaging/rpm/init.d/grafana-server
View file @
c4424844
...
...
@@ -53,37 +53,21 @@ fi
# overwrite settings from default file
[
-e
/etc/sysconfig/
$NAME
]
&&
.
/etc/sysconfig/
$NAME
PID_FILE
=
/var/run/
$NAME
.pid
DAEMON_OPTS
=
"--pidfile=
${
PID_FILE
}
--config=
${
CONF_FILE
}
--default-data-path=
${
DATA_DIR
}
--default-log-path=
${
LOG_DIR
}
web"
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
pidofproc
()
{
if
[
$#
-ne
3
]
;
then
echo
"Expected three arguments, e.g.
$0
-p pidfile daemon-name"
fi
pid
=
`
pgrep
-f
$3
`
local
pidfile
=
`
cat
$2
`
if
[
"x
$pidfile
"
==
"x"
]
;
then
return
1
fi
if
[
"x
$pid
"
!=
"x"
-a
"
$pidfile
"
==
"
$pid
"
]
;
then
return
0
fi
return
1
function
isRunning
()
{
status
-p
$PID_FILE
$NAME
>
/dev/null 2>&1
}
case
"
$1
"
in
start
)
echo
-n
$"Starting
$DESC
: .... "
pid
=
`
pidofproc
-p
$PID_FILE
grafana
`
if
[
-n
"
$pid
"
]
;
then
isRunning
if
[
$?
-eq
0
]
;
then
echo
"Already running."
exit
2
fi
...
...
@@ -97,7 +81,8 @@ case "$1" in
fi
# Start Daemon
su
-s
/bin/sh
-c
"nohup
${
DAEMON_PATH
}
--pidfile=
${
DAEMON_PID
}
${
DAEMON_OPTS
}
>>
$STDOUT
3>&1 &"
$DAEMON_USER
cd
$GRAFANA_HOME
su
-s
/bin/sh
-c
"nohup
${
DAEMON
}
${
DAEMON_OPTS
}
>> /dev/null 3>&1 &"
$DAEMON_USER
return
=
$?
if
[
$return
-eq
0
]
then
...
...
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