Browse Source

Create gemini_chk

kodlz 2 năm trước cách đây
mục cha
commit
cb8e50f290
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 12 0
      gemini_chk

+ 12 - 0
gemini_chk

@@ -0,0 +1,12 @@
+#!/bin/bash
+# make sure the pihole-gemini script is being run by gravity.sh
+
+GEMINI='su -c /usr/local/bin/pihole-gemini - <gemini user>'
+GRAVITY=/opt/pihole/gravity.sh
+
+TRIGGER=$(sed -e '$!{h;d;}' -e x $GRAVITY)
+if [ "$TRIGGER" != "$GEMINI" ]
+then
+        # insert the gemini commandline before the last line of the script
+        sed -i "$ i$GEMINI" $GRAVITY
+fi