summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD9
-rw-r--r--gogios-bin.install8
3 files changed, 20 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f4732de436a8..2834b092f832 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,24 @@
pkgbase = gogios-bin
pkgdesc = Checks to see if required services are still running on important machines.
- pkgver = 2.2.1
+ pkgver = 3.0.0
pkgrel = 1
url = https://angrysysadmins.tech
install = gogios-bin.install
arch = x86_64
license = MIT
+ optdepends = nmap
+ optdepends = sqlite
optdepends = nginx
optdepends = gogios-plugins
provides = gogios
conflicts = gogios
- noextract = gogios-2.2.1-1-x86_64.pkg.tar.xz
+ noextract = gogios-3.0.0-1-x86_64.pkg.tar.xz
options = !strip
options = !emptydirs
- source = https://github.com/BKasin/gogios/releases/download/2.2.1/gogios-2.2.1-1-x86_64.pkg.tar.xz
- sha256sums = 521125ed75fb3b27b41298a7871bbe512d70e07ecc0fb3b813e62c1b85bf2293
+ backup = etc/gogios/gogios.toml
+ backup = etc/gogios/checks.json
+ source = https://github.com/BKasin/gogios/releases/download/3.0.0/gogios-3.0.0-1-x86_64.pkg.tar.xz
+ sha256sums = b7a0f1289ab2f8e5ce47862e68e76ea9978b042894afd82c866d8643aca02314
pkgname = gogios-bin
diff --git a/PKGBUILD b/PKGBUILD
index 67d8c7b93e47..894e3740679a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,15 @@
# Maintainer: Bailey Kasin <bailey@gingertechnology.net> (https://angrysysadmins.tech)
pkgname=gogios-bin
-pkgver=2.2.1
+pkgver=3.0.0
pkgrel=1
pkgdesc="Checks to see if required services are still running on important machines."
arch=('x86_64')
url="https://angrysysadmins.tech"
license=('MIT')
optdepends=(
+ 'nmap'
+ 'sqlite'
'nginx'
'gogios-plugins'
)
@@ -15,10 +17,13 @@ source=("https://github.com/BKasin/gogios/releases/download/${pkgver}/gogios-${p
options=('!strip' '!emptydirs')
install=${pkgname}.install
noextract=("gogios-${pkgver}-${pkgrel}-${arch}.pkg.tar.xz")
-sha256sums=('521125ed75fb3b27b41298a7871bbe512d70e07ecc0fb3b813e62c1b85bf2293')
+sha256sums=('b7a0f1289ab2f8e5ce47862e68e76ea9978b042894afd82c866d8643aca02314')
provides=('gogios')
conflicts=('gogios')
+backup=(etc/gogios/{gogios.toml,checks.json})
+NoUpgrade=/etc/gogios/gogios.sample.toml
+
package() {
tar -xf gogios-${pkgver}-${pkgrel}-${arch}.pkg.tar.xz -C "${pkgdir}"
rm "${pkgdir}"/{.MTREE,.PKGINFO,.INSTALL}
diff --git a/gogios-bin.install b/gogios-bin.install
index aa07d8af0bd0..bbc739dd2bfa 100644
--- a/gogios-bin.install
+++ b/gogios-bin.install
@@ -9,6 +9,7 @@ pre_install() {
}
post_install() {
+ DATABASE_DIR=/var/lib/gogios
LOG_DIR=/var/log/gogios
SCRIPT_DIR=/usr/lib/gogios/scripts
@@ -16,6 +17,10 @@ post_install() {
chown -R -L gogios:gogios $LOG_DIR
chmod 755 $LOG_DIR
+ test -d $DATABASE_DIR || mkdir -p $DATABASE_DIR
+ chown -R -L gogios:gogios $DATABASE_DIR
+ chmod 755 $DATABASE_DIR
+
cp -f $SCRIPT_DIR/gogios.service /usr/lib/systemd/system/gogios.service
systemctl enable gogios || true
systemctl daemon-reload || true
@@ -30,9 +35,6 @@ post_install() {
echo "Making default check file"
cp /etc/gogios/example.json /etc/gogios/checks.json
fi
-
- # Gogios will fail to start if these files aren't owned
- chown gogios:gogios -R /opt/gogios
}
post_upgrade() {