summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBailey Kasin2020-01-09 03:04:16 -0800
committerBailey Kasin2020-01-09 03:04:16 -0800
commit6687e43ace342d6bf8fd5e2a1d2f1f9583a8eaf1 (patch)
tree58f2379312e1597cd86319ba27a338f5853564bb
parentf61aed76e01f9f111169cdb9584d532a1c849b5c (diff)
downloadaur-6687e43ace342d6bf8fd5e2a1d2f1f9583a8eaf1.tar.gz
Fix gogios.install and 2.1
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD7
-rw-r--r--gogios-bin.install31
3 files changed, 25 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 17ae54c19d03..e80f0edc8f6f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gogios-bin
pkgdesc = Checks to see if required services are still running on important machines.
- pkgver = 1.3
+ pkgver = 2.1
pkgrel = 1
url = https://angrysysadmins.tech
install = gogios-bin.install
@@ -10,11 +10,11 @@ pkgbase = gogios-bin
optdepends = nmap
provides = gogios
conflicts = gogios
- noextract = gogios-1.3.deb
+ noextract = gogios-2.1.deb
options = !strip
options = !emptydirs
- source = https://github.com/BKasin/Gogios/releases/download/1.3/gogios-1.3.deb
- sha256sums = 1f21c298c39e4d12155d1512a307443e836ba3e8731c339e05ec17abcbebc51d
+ source = https://github.com/BKasin/Gogios/releases/download/2.1/gogios-2.1.deb
+ sha256sums = 33bd3bfb2b3ac80a5c8ae14faac41fff909fb4c648899db6b1db02db6f1b7409
pkgname = gogios-bin
diff --git a/PKGBUILD b/PKGBUILD
index 495c376aab65..6addccf99d2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Bailey Kasin <bailey@gingertechnology.net> (https://angrysysadmins.tech)
pkgname=gogios-bin
-pkgver=1.3
+pkgver=2.1
pkgrel=1
pkgdesc="Checks to see if required services are still running on important machines."
arch=('x86_64')
@@ -15,7 +15,7 @@ source=("https://github.com/BKasin/Gogios/releases/download/${pkgver}/gogios-${p
options=('!strip' '!emptydirs')
install=${pkgname}.install
noextract=("gogios-${pkgver}.deb")
-sha256sums=('1f21c298c39e4d12155d1512a307443e836ba3e8731c339e05ec17abcbebc51d')
+sha256sums=('33bd3bfb2b3ac80a5c8ae14faac41fff909fb4c648899db6b1db02db6f1b7409')
provides=('gogios')
conflicts=('gogios')
@@ -24,5 +24,4 @@ package() {
# Permission fix
find "${pkgdir}" -type d -exec chmod 755 {} +
-}
-
+} \ No newline at end of file
diff --git a/gogios-bin.install b/gogios-bin.install
index 2c6d5925b67a..000903746d2c 100644
--- a/gogios-bin.install
+++ b/gogios-bin.install
@@ -1,39 +1,44 @@
post_install() {
- if [ ! -f /etc/gingertechengine/checks.json ]; then
+ if [ ! -f /etc/gogios/checks.json ]; then
echo "Making default check file"
- cp /etc/gingertechengine/example.json /etc/gingertechengine/checks.json
+ cp /etc/gogios/example.json /etc/gogios/checks.json
fi
- if [ ! -f /etc/gingertechengine/gogios.toml ]; then
+ if [ ! -f /etc/gogios/gogios.toml ]; then
echo "Making default config"
- cp /etc/gingertechengine/gogios.sample.toml /etc/gingertechengine/gogios.toml
+ cp /etc/gogios/gogios.sample.toml /etc/gogios/gogios.toml
fi
- if [ ! -f /opt/gingertechengine/js/current.json ]; then
+ if [ ! -f /opt/gogios/js/current.json ]; then
echo "Making current results file"
- cp /etc/gingertechengine/checks.json /opt/gingertechengine/js/current.json
+ cp /etc/gogios/checks.json /opt/gogios/js/current.json
+ fi
+
+ if [ ! -f /var/log/gogios ]; then
+ mkdir /var/log/gogios
fi
if id "gogios" >/dev/null 2>&1; then
echo "gogios user already exists"
else
+ mkdir -p /var/spool/gogios
useradd --system --user-group --home-dir /var/spool/gogios --shell /sbin/nologin gogios
+ chown gogios:gogios /var/spool/gogios
fi
- chown gogios:gogios -R /var/log/gingertechnology
- chmod 0664 -R /var/log/gingertechnology
- chown gogios:gogios -R /usr/lib/gingertechengine
- chown gogios:gogios -R /etc/gingertechengine
- chown gogios:gogios -R /opt/gingertechengine
+ chown gogios:gogios -R /var/log/gogios
+ chmod 0764 -R /var/log/gogios
+ chown gogios:gogios -R /usr/lib/gogios
+ chown gogios:gogios -R /etc/gogios
+ chown gogios:gogios -R /opt/gogios
}
post_upgrade() {
post_install
-
- systemctl restart gogios
}
pre_remove() {
systemctl stop gogios
systemctl disable gogios
}
+