Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/sharedra...
File: autossl_runner.sh
#!/bin/bash
[0] Fix | Delete
# The concept here is to kill an autossl proc that is taking longer than
[1] Fix | Delete
# 24 hours. My theory is that sometimes the proc will get stuck, never finish
[2] Fix | Delete
# and then cause autossl to never run properly.
[3] Fix | Delete
[4] Fix | Delete
pgrep autossl_check | while read pid; do
[5] Fix | Delete
run_days=$(ps --no-headers -p $pid -o etime | awk '/[0-9]+\-/');
[6] Fix | Delete
if [[ ! -z $run_days ]]; then
[7] Fix | Delete
proc_name=$(ps --no-headers -p $pid -o args);
[8] Fix | Delete
logger "Killing $pid, running for $run_days - $proc_name";
[9] Fix | Delete
kill $pid;
[10] Fix | Delete
fi
[11] Fix | Delete
done
[12] Fix | Delete
[13] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function