#!/bin/bash
#=========================================#
# Simple update notifier (DNF) v0.3.8     #
#=========================================##
ICON='/usr/share/icons/hicolor/48x48/apps/simple-notifier.png'
pkill -f 'Enable Updates' &
if [  -f /usr/share/simple-notifier/scripts/update-intervals ]; then
mv -f /usr/share/simple-notifier/scripts/update-intervals /usr/share/simple-notifier/scripts/update-intervals-
pkill -f 'Simple Update Notifier' > /dev/null 2>&1 
PID=`ps -eaf | grep update-intervals | grep -v grep | awk '{print $2}'`
if [[ "" !=  "$PID" ]]; then
  echo "killing $PID"
  kill -9 $PID > /dev/null 2>&1 
exit 0
fi 
 fi
sleep 1
yad --width=400 --height=90 --center --on-top --fixed \
--text="\nUpdate check intervals is disabled" \
--window-icon=$ICON \
--image=$ICON \
--title='Simple Update Notifier' \
--button=OK!/usr/share/simple-notifier/icons/exit.png
exit 0
