mirror of https://gitlab.com/bashrc2/epicyon
More general scripts for different install directories
parent
5ddbeba91c
commit
f2e1604a2a
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep -i ' follow accept ' > .accept_events.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep -i ' follow accept ' > .accept_events.txt
|
||||
if [ ! -f .accept_events.txt ]; then
|
||||
echo 'No follow Accept events'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon -r | grep "WARN: type from\|is not a string\|should be a string\|should be lists\|should be strings\|has no valid context\|should be a list"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} -r | grep "WARN: type from\|is not a string\|should be a string\|should be lists\|should be strings\|has no valid context\|should be a list"
|
||||
|
|
|
|||
|
|
@ -1,18 +1,30 @@
|
|||
#!/bin/bash
|
||||
if [ -d /etc/epicyon ]; then
|
||||
cd /etc/epicyon || exit 0
|
||||
dir_name="epicyon"
|
||||
if [ -d /etc/${dir_name} ]; then
|
||||
cd /etc/${dir_name} || exit 0
|
||||
else
|
||||
cd /opt/epicyon || exit 0
|
||||
if [ -d /opt/${dir_name} ]; then
|
||||
cd /opt/${dir_name} || exit 0
|
||||
elif [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo 'Digest calculation times'
|
||||
journalctl -u epicyon | grep "DIGEST|" | awk -F '|' '{print $2}' | sort -r | uniq | head -n 20
|
||||
journalctl -u ${dir_name} | grep "DIGEST|" | awk -F '|' '{print $2}' | sort -r | uniq | head -n 20
|
||||
|
||||
echo ''
|
||||
echo 'Timings for GET'
|
||||
journalctl -u epicyon -r | grep "GET TIMING|" | head -n 50
|
||||
journalctl -u ${dir_name} -r | grep "GET TIMING|" | head -n 50
|
||||
|
||||
echo ''
|
||||
echo 'Timings for POST'
|
||||
journalctl -u epicyon -r | grep "POST TIMING|" | head -n 50
|
||||
journalctl -u ${dir_name} -r | grep "POST TIMING|" | head -n 50
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep -i 'get_json forbidden \|blocked' > .blocked_events.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep -i 'get_json forbidden \|blocked' > .blocked_events.txt
|
||||
if [ ! -f .blocked_events.txt ]; then
|
||||
echo 'No blocking events'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon -r | grep "CAPABILITIES:"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} -r | grep "CAPABILITIES:"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon -r | grep "Sending profile update to\|a shared inbox"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} -r | grep "Sending profile update to\|a shared inbox"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
#!/bin/bash
|
||||
if [ -d /etc/epicyon ]; then
|
||||
cd /etc/epicyon || exit 0
|
||||
dir_name="epicyon"
|
||||
if [ -d /etc/${dir_name} ]; then
|
||||
cd /etc/${dir_name} || exit 0
|
||||
else
|
||||
cd /opt/epicyon || exit 0
|
||||
if [ -d /opt/${dir_name} ]; then
|
||||
cd /opt/${dir_name} || exit 0
|
||||
elif [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
git stash
|
||||
git remote set-url origin https://gitlab.com/bashrc2/epicyon.git
|
||||
git checkout main
|
||||
chown -R epicyon:epicyon *
|
||||
chown -R ${dir_name}:${dir_name} *
|
||||
chmod 644 *.py
|
||||
chmod 644 src/*.py
|
||||
|
|
|
|||
|
|
@ -28,6 +28,23 @@
|
|||
|
||||
PROJECT_NAME=epicyon
|
||||
epicyonInstallDir=/opt/${PROJECT_NAME}
|
||||
dir_name=${PROJECT_NAME}
|
||||
if [ -d /etc/${dir_name} ]; then
|
||||
epicyonInstallDir=/etc/${dir_name}
|
||||
else
|
||||
if [ -d /opt/${dir_name} ]; then
|
||||
epicyonInstallDir=/opt/${dir_name}
|
||||
elif [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
epicyonInstallDir=/opt/${dir_name}
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
epicyonInstallDir=/opt/${dir_name}
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
epicyonInstallDir=/opt/${dir_name}
|
||||
fi
|
||||
fi
|
||||
|
||||
MY_EMAIL_ADDRESS="username@domain"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'File "\|ERROR:' > .errors.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'File "\|ERROR:' > .errors.txt
|
||||
if [ ! -f .errors.txt ]; then
|
||||
echo 'No errors'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'EX: ' > .exceptions.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'EX: ' > .exceptions.txt
|
||||
if [ ! -f .exceptions.txt ]; then
|
||||
echo 'No exceptions'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'image binary\|favicon is not an image\|image size before\|watermark failed\|image metadata removal\|media saved to\|failed to restore backup image\|failed to rename image\|media could not be saved to\|failed to delete backup image\|post_message_to_outbox unable to rename\|rename image upload\|uploaded image saved to\|uploaded image not saved\|final uploaded image size\|creating s2s post with no attached media\|creating c2s post with no attached media\|creating s2s post with attached media\|creating c2s post with attached media' > .image.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'image binary\|favicon is not an image\|image size before\|watermark failed\|image metadata removal\|media saved to\|failed to restore backup image\|failed to rename image\|media could not be saved to\|failed to delete backup image\|post_message_to_outbox unable to rename\|rename image upload\|uploaded image saved to\|uploaded image not saved\|final uploaded image size\|creating s2s post with no attached media\|creating c2s post with no attached media\|creating s2s post with attached media\|creating c2s post with attached media' > .image.txt
|
||||
if [ ! -f .image.txt ]; then
|
||||
echo 'No image warnings'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep "INBOX:"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep "INBOX:"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep "invalid expanded\|invalid nickname\|invalid header\|invalid characters\|leech bounced\|LLM scraper\|suspicious\|contradictory browsers\|bad path\|not wordpress\|attempt to access passwords\|GET Unknown request"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep "invalid expanded\|invalid nickname\|invalid header\|invalid characters\|leech bounced\|LLM scraper\|suspicious\|contradictory browsers\|bad path\|not wordpress\|attempt to access passwords\|GET Unknown request"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'could not be' > .keyfailures.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'could not be' > .keyfailures.txt
|
||||
if [ ! -f .keyfailures.txt ]; then
|
||||
echo 'No key failures'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon -r | grep "Login \|login attempt\|login param"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} -r | grep "Login \|login attempt\|login param"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'required positional arguments' > .missing_arguments.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'required positional arguments' > .missing_arguments.txt
|
||||
if [ ! -f .missing_arguments.txt ]; then
|
||||
echo 'No missing arguments'
|
||||
else
|
||||
|
|
|
|||
13
scripts/mitm
13
scripts/mitm
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'MITM:' > .mitm_events.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'MITM:' > .mitm_events.txt
|
||||
if [ ! -f .mitm_events.txt ]; then
|
||||
echo 'No MITM events'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep "REJECT"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep "REJECT"
|
||||
|
|
|
|||
|
|
@ -5,16 +5,18 @@ if [ -d /etc/${dir_name} ]; then
|
|||
else
|
||||
if [ -d /opt/${dir_name} ]; then
|
||||
cd /opt/${dir_name} || exit 0
|
||||
else if [ -d /opt/epicyon-tor ]; then
|
||||
elif [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
else if [ -d /opt/epicyon-i2p ]; then
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
else if [ -d /opt/epicyon-yggdrasil ]; then
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
cd /opt/${dir_name} || exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
git stash
|
||||
git pull
|
||||
chown -R ${dir_name}:${dir_name} *
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep "Sending post to followers"
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep "Sending post to followers"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'THREAD:' > .threads.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'THREAD:' > .threads.txt
|
||||
if [ ! -f .threads.txt ]; then
|
||||
echo 'No thread events'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep 'unauthorized ' > .unauthorized.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep 'unauthorized ' > .unauthorized.txt
|
||||
if [ ! -f .unauthorized.txt ]; then
|
||||
echo 'No unauthorized events'
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep ' unknown users path' > .unknown_users_paths.txt
|
||||
dir_name="epicyon"
|
||||
if [ ! -d /etc/${dir_name} ]; then
|
||||
if [ -d /opt/epicyon-tor ]; then
|
||||
dir_name="epicyon-tor"
|
||||
elif [ -d /opt/epicyon-i2p ]; then
|
||||
dir_name="epicyon-i2p"
|
||||
elif [ -d /opt/epicyon-yggdrasil ]; then
|
||||
dir_name="epicyon-yggdrasil"
|
||||
fi
|
||||
fi
|
||||
|
||||
journalctl -u ${dir_name} | grep ' unknown users path' > .unknown_users_paths.txt
|
||||
if [ ! -f .unknown_users_paths.txt ]; then
|
||||
echo 'No unknown users paths'
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue