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
50bc801f
Commit
50bc801f
authored
Dec 06, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboards as cfg: copy dash/ds files if missing
parent
361acd3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
packaging/deb/control/postinst
+5
-3
packaging/rpm/control/postinst
+5
-3
No files found.
packaging/deb/control/postinst
View file @
50bc801f
...
...
@@ -29,11 +29,13 @@ case "$1" in
if
[
!
-f
$CONF_FILE
]
;
then
cp /usr/share/grafana/conf/sample.ini
$CONF_FILE
cp /usr/share/grafana/conf/ldap.toml /etc/grafana/ldap.toml
fi
if
[
!
-f
$DATASOURCES_CFG_DIR
]
;
then
mkdir
-p
/etc/grafana/dashboards /etc/grafana/datasources
cp /usr/share/grafana/conf/dashboards/sample.yaml
/etc/grafana/dashboards
/sample.yaml
cp /usr/share/grafana/conf/datasources/sample.yaml
/etc/grafana/datasources
/sample.yaml
fi
cp /usr/share/grafana/conf/dashboards/sample.yaml
$DASHBOARDS_CFG_DIR
/sample.yaml
cp /usr/share/grafana/conf/datasources/sample.yaml
$DATASOURCES_CFG_DIR
/sample.yaml
fi
# configuration files should not be modifiable by grafana user, as this can be a security issue
chown
-Rh
root:
$GRAFANA_GROUP
/etc/grafana/
*
...
...
packaging/rpm/control/postinst
View file @
50bc801f
...
...
@@ -43,11 +43,13 @@ if [ $1 -eq 1 ] ; then
if
[
!
-f
$CONF_FILE
]
;
then
cp /usr/share/grafana/conf/sample.ini
$CONF_FILE
cp /usr/share/grafana/conf/ldap.toml /etc/grafana/ldap.toml
fi
if
[
!
-f
$DATASOURCES_CFG_DIR
]
;
then
mkdir
-p
/etc/grafana/dashboards /etc/grafana/datasources
cp /usr/share/grafana/conf/dashboards/sample.yaml
/etc/grafana/dashboards
/sample.yaml
cp /usr/share/grafana/conf/datasources/sample.yaml
/etc/grafana/datasources
/sample.yaml
fi
cp /usr/share/grafana/conf/dashboards/sample.yaml
$DASHBOARDS_CFG_DIR
/sample.yaml
cp /usr/share/grafana/conf/datasources/sample.yaml
$DATASOURCES_CFG_DIR
/sample.yaml
fi
# Set user permissions on /var/log/grafana, /var/lib/grafana
mkdir
-p
/var/log/grafana /var/lib/grafana
...
...
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