Create gemini_chk
This commit is contained in:
parent
9ee3e43ae5
commit
cb8e50f290
1 changed files with 12 additions and 0 deletions
12
gemini_chk
Normal file
12
gemini_chk
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue