Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. #!/bin/sh
  2. # Mario Limonciello, March 2007
  3.  
  4. #source our dialog functions
  5. . /usr/share/mythtv/dialog_functions.sh
  6.  
  7. #find the session, dialog and su manager we will be using for display
  8. find_session
  9. find_dialog
  10. find_su
  11.  
  12. #check that we are in the mythtv group
  13. check_groups
  14.  
  15. #if group membership is okay, go ahead and continue
  16. if [ "$IGNORE_NOT" = "0" ]; then
  17.  
  18. dialog_question "MythTV Setup Preparation" "Mythbackend must be closed before continuing.\nIs it OK to close any currently running mythbackend processes?"
  19. CLOSE_NOT=$?
  20. if [ "$CLOSE_NOT" = "0" ]; then
  21. if [ "$DE" = "kde" ]; then
  22. $SU_TYPE stop mythtv-backend
  23. else
  24. $SU_TYPE stop mythtv-backend --message "Please enter your current login password to stop mythtv-backend."
  25. fi
  26. xterm -title "MythTV Setup Terminal" -e taskset -c 0 /usr/bin/mythtv-setup.real "$@"
  27. if [ "$DE" = "kde" ]; then
  28. $SU_TYPE start mythtv-backend
  29. else
  30. $SU_TYPE start mythtv-backend --message "Please enter your current login password to start mythtv-backend."
  31. fi
  32. dialog_question "Fill Database?" "Would you like to run mythfilldatabase?"
  33. DATABASE_NOT=$?
  34. if [ "$DATABASE_NOT" = "0" ]; then
  35. xterm -title "Running mythfilldatabase" -e "unset DISPLAY && unset SESSION_MANAGER && mythfilldatabase; sleep 3"
  36. fi
  37. fi
  38. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement