summarylogtreecommitdiffstats
path: root/gogios.install
diff options
context:
space:
mode:
authorBailey Kasin2020-04-20 22:11:45 -0700
committerBailey Kasin2020-04-20 22:11:45 -0700
commit1f5e198100e9d436bb65111b875e72249054307a (patch)
tree8d79e7848c6f3e99f86dd6b3b3669b5c80fd188b /gogios.install
parentea2b1e7ce9042acd8f4e152cdbed718d4d84b73b (diff)
downloadaur-1f5e198100e9d436bb65111b875e72249054307a.tar.gz
gogios 3.0.0
Diffstat (limited to 'gogios.install')
-rw-r--r--gogios.install8
1 files changed, 5 insertions, 3 deletions
diff --git a/gogios.install b/gogios.install
index aa07d8af0bd0..bbc739dd2bfa 100644
--- a/gogios.install
+++ b/gogios.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() {