urukupdater 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Uruk Update Manager
  5. #
  6. # Copyright 2021 hayder majid <hayder@riseup.net>
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  21. # MA 02110-1301, USA.
  22. CHECK_PRO="$(ps -ef | grep '[p]ython3 /usr/share/urukUpdater/urukupdater.py' | awk '{print $2}')"
  23. if [ "${CHECK_PRO}" != "" ]; then
  24. zenity --info --title="Uruk Updater" --text="Uruk Updater is already running\!" --ok-label="ok" --width=200 --height=100;
  25. else
  26. python3 /usr/share/urukUpdater/urukupdater.py &> /dev/null &
  27. fi
  28. CHECK_PRO="$(ps -ef | grep '[p]ython3 /usr/share/urukUpdater/trig_timer.py' | awk '{print $2}')"
  29. if [ "${CHECK_PRO}" = "" ]; then
  30. python3 /usr/share/urukUpdater/trig_timer.py &
  31. fi
  32. exit 0