#!/bin/bash
#========================================================#
# Simple update notifier version 0.3.9 ==================#
#========================================================#
# Simple apt-based update notifier                       #
#========================================================#
EXEC="/usr/share/simple-notifier/scripts/refresh"
# Warn if synaptic is running
RUN=$(ps -ef | grep "synaptic" | grep -v grep | wc -l)
if [ "$RUN" -gt 0 ]; then
/usr/share/simple-notifier/warning.py 2>/dev/null
exit 0
else
script_dir="$( cd "$( dirname "$0" )" && pwd )"
script="`basename $0`"
script_path_n_name="${script_dir}/${script}"
GUI_SU="pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY"
if [ "$UID" != "0" ]; then
$GUI_SU "$EXEC"; exit;
fi
 fi
