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
0c372f0b
Commit
0c372f0b
authored
Mar 21, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v4.2.x'
parents
3d3357ee
99064603
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
11 deletions
+44
-11
build.go
+12
-4
packaging/rpm/control/postinst
+0
-7
packaging/rpm/control/posttrans
+32
-0
No files found.
build.go
View file @
0c372f0b
...
@@ -14,13 +14,13 @@ import (
...
@@ -14,13 +14,13 @@ import (
"log"
"log"
"os"
"os"
"os/exec"
"os/exec"
"path"
"path/filepath"
"path/filepath"
"regexp"
"regexp"
"runtime"
"runtime"
"strconv"
"strconv"
"strings"
"strings"
"time"
"time"
"path"
)
)
var
(
var
(
...
@@ -126,9 +126,9 @@ func makeLatestDistCopies() {
...
@@ -126,9 +126,9 @@ func makeLatestDistCopies() {
log
.
Fatalf
(
"failed to create latest copies. Cannot read from /dist"
)
log
.
Fatalf
(
"failed to create latest copies. Cannot read from /dist"
)
}
}
latestMapping
:=
map
[
string
]
string
{
latestMapping
:=
map
[
string
]
string
{
".deb"
:
"dist/grafana_latest_amd64.deb"
,
".deb"
:
"dist/grafana_latest_amd64.deb"
,
".rpm"
:
"dist/grafana-latest-1.x86_64.rpm"
,
".rpm"
:
"dist/grafana-latest-1.x86_64.rpm"
,
".tar.gz"
:
"dist/grafana-latest.linux-x64.tar.gz"
,
".tar.gz"
:
"dist/grafana-latest.linux-x64.tar.gz"
,
}
}
...
@@ -287,6 +287,14 @@ func createPackage(options linuxPackageOptions) {
...
@@ -287,6 +287,14 @@ func createPackage(options linuxPackageOptions) {
"-p"
,
"./dist"
,
"-p"
,
"./dist"
,
}
}
if
options
.
packageType
==
"rpm"
{
args
=
append
(
args
,
"--rpm-posttrans"
,
"packaging/rpm/control/posttrans"
)
}
if
options
.
packageType
==
"deb"
{
args
=
append
(
args
,
"--deb-no-default-config-files"
)
}
if
pkgArch
!=
""
{
if
pkgArch
!=
""
{
args
=
append
(
args
,
"-a"
,
pkgArch
)
args
=
append
(
args
,
"-a"
,
pkgArch
)
}
}
...
...
packaging/rpm/control/postinst
100644 → 100755
View file @
0c372f0b
...
@@ -68,13 +68,6 @@ if [ $1 -eq 1 ] ; then
...
@@ -68,13 +68,6 @@ if [ $1 -eq 1 ] ; then
echo
" sudo service grafana-server start"
echo
" sudo service grafana-server start"
fi
fi
elif
[
$1
-ge
2
]
;
then
elif
[
$1
-ge
2
]
;
then
if
[
-x
/opt/grafana/
]
;
then
echo
"### Upgrading Notice ### "
echo
"-- New grafana install home is /usr/share/grafana"
echo
"-- Please move sqlite3 database to /var/lib/grafana/"
echo
"-- Notice: service name && binary changed to grafana-server"
fi
if
[
"
$RESTART_ON_UPGRADE
"
==
"true"
]
;
then
if
[
"
$RESTART_ON_UPGRADE
"
==
"true"
]
;
then
stopGrafana
stopGrafana
startGrafana
startGrafana
...
...
packaging/rpm/control/posttrans
0 → 100755
View file @
0c372f0b
#!/bin/sh
set
-e
echo
"POSTTRANS: Running script"
[
-f
/etc/sysconfig/grafana-server
]
&&
.
/etc/sysconfig/grafana-server
# copy config files if missing
if
[
!
-f
/etc/grafana/grafana.ini
]
;
then
echo
"POSTTRANS: Config file not found"
if
[
-f
/etc/grafana/grafana.ini.rpmsave
]
;
then
echo
"POSTTRANS: /etc/grafana/grafana.ini.rpmsave config file found."
mv /etc/grafana/grafana.ini.rpmsave /etc/grafana/grafana.ini
echo
"POSTTRANS: /etc/grafana/grafana.ini restored"
if
[
-f
/etc/grafana/ldap.toml.rpmsave
]
;
then
echo
"POSTTRANS: /etc/grafana/ldap.toml.rpmsave found"
mv /etc/grafana/ldap.toml.rpmsave /etc/grafana/ldap.toml
echo
"POSTTRANS: /etc/grafana/ldap.toml restored"
fi
echo
"POSTTRANS: Restoring config file permissions"
chown
-Rh
root:
$GRAFANA_GROUP
/etc/grafana/
*
chmod 755 /etc/grafana
find /etc/grafana
-type
f
-exec
chmod 640
{}
';'
find /etc/grafana
-type
d
-exec
chmod 755
{}
';'
fi
fi
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