Skip to content

Commit

Permalink
Add dbus tracking and fix a typo in omr-schedule services script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jan 30, 2025
1 parent 0e066a3 commit 8deaac5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions omr-schedule/files/usr/share/omr/schedule.d/010-services
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ if [ "$(pgrep rpcd)" = "" ] && [ -f /etc/init.d/rpcd ]; then
/etc/init.d/rpcd restart >/dev/null 2>&1
sleep 5
fi
if [ "$(pgrep dbus)" = "" ] && [ -f /etc/init.d/dbus ]; then
_log "Can't find dbus, restart it..."
/etc/init.d/dbus restart >/dev/null 2>&1
sleep 5
fi

if [ "$(pgrep uhttpd)" = "" ] && [ -f /etc/init.d/uhttpd ]; then
_log "Can't find uhttpd, restart it..."
Expand Down Expand Up @@ -193,7 +198,7 @@ multipath_fix() {
config_get multipath "$1" multipath
[ "$multipath" != "off" ] && return
config_get device "$1" device
{ "$(echo $device | grep '@')" ] && return
[ "$(echo $device | grep '@')" ] && return
interface="$(ifstatus $1 | jsonfilter -q -e '@.l3_device' | tr -d '\n')"
[ -n "$interface" ] && [ -z "$(multipath $interface | grep deactivated)" ] && {
_log "Fix Multipath status on $1 ($interface)"
Expand Down Expand Up @@ -239,7 +244,7 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
echo 1 > /sys/bus/pci/rescan
fi

if [ -f /etc/init.d/omr-bypass ] && (([ -e /usr/sbin/iptables-nft-save ] && [ "$(iptables-nft-save 2>/dev/null | grep omr-bypass)" = "" ]) || [ "$(iptables-save 2>/dev/null | grep omr-bypass)" = "" ]) && [ "$(pgrep -f omr-bypass)" = "" ]; then
if [ -f /etc/init.d/omr-bypass ] && [ -z "$(pgrep -f omr-bypass)" ] && (([ -e /usr/sbin/iptables-nft-save ] && [ "$(iptables-nft-save 2>/dev/null | grep omr-bypass)" = "" ]) || [ "$(iptables-save 2>/dev/null | grep omr-bypass)" = "" ]); then
_log "Can't find omr-bypass rules, restart omr-bypass..."
/etc/init.d/omr-bypass start >/dev/null 2>&1
sleep 5
Expand Down

0 comments on commit 8deaac5

Please sign in to comment.