• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Mausberry Shutdown Script Doesn't Save Metadata

Scheduled Pinned Locked Moved ControlBlock, PowerBlock & Co.
mausberry
251 Posts 10 Posters 94.9k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    lostless @meleu
    last edited by 11 Oct 2017, 23:27

    @meleu https://ghostbin.com/paste/qa5ph
    Just want to say thanks for all your help.

    1 Reply Last reply Reply Quote 0
    • L
      lostless
      last edited by 11 Oct 2017, 23:42

      @meleu Sorry, looks like copying from nano cut a lot off text. heres a good copy
      https://ghostbin.com/paste/q9zsm

      M 2 Replies Last reply 11 Oct 2017, 23:58 Reply Quote 1
      • M
        meleu @lostless
        last edited by meleu 10 Dec 2017, 00:59 11 Oct 2017, 23:58

        @lostless Thanks for this. I've found the problem. The runcommand.sh script changed a bit 3 days ago. I just have to adapt my Regular Expression and make it stronger. Wait a little, I'll try to sort it on our script.

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        1 Reply Last reply Reply Quote 1
        • M
          meleu @lostless
          last edited by 12 Oct 2017, 00:10

          @lostless I made my tests on a shell where there's no RetroPie installed and I believe it will work fine. But, you know, sh!t happens...

          Try this version, please (feedback would be appreciated):

          #!/bin/bash
          # Terminate any emulatorcall!
          # This works just for RetroPie!
          emucall="$(sed -n 4p /dev/shm/runcommand.info | tr -d '\\"' | tr '^$[]*.()|+?{}' '.' | sed 's/[^ ]*=[^ ]* //g')"
          # If there's an emulator running, we need to kill it and go back to ES
          if [[ -n "$emucall" ]]; then
              emupid="$(pgrep -f "$emucall")" 
              pkill -P "$emupid"
              kill "$emupid"
              wait "$emupid"
              sleep 5 # maybe it can be lesser
          fi
          

          maybe I'll try to simplify that crazy line with a simpler regex later... ;-)

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          L 1 Reply Last reply 12 Oct 2017, 00:21 Reply Quote 1
          • L
            lostless @meleu
            last edited by 12 Oct 2017, 00:21

            @meleu Its working in retroarch now im going to patch in into my mauseberry shutdown script!!!!!!!!!!!!!! YOU ARE THE MAN
            But kodi is not working
            https://ghostbin.com/paste/uqo6e
            debug of kodi not exiting.
            not a big deal if kodi does not work. Just kind of want my reset button to be the end all to go back to ES.

            M 1 Reply Last reply 12 Oct 2017, 00:51 Reply Quote 1
            • M
              meleu @lostless
              last edited by 12 Oct 2017, 00:51

              @lostless said in Mausberry Shutdown Script Doesn't Save Metadata:

              But kodi is not working

              Here it goes another version, trying to get kodi too:

              # Terminate any emulatorcall!
              # This works just for RetroPie!
              emucall="$(sed -n 4p /dev/shm/runcommand.info | tr -d '\\"' | tr '^$[]*.()|+?{}' '.' | sed 's/[^ ]*=[^ ]* //g')"
              # If there's an emulator running, we need to kill it and go back to ES
              if [[ -n "$emucall" ]]; then
                  emupid="$(pgrep -f "$emucall" | tr '\n' ' ')"
                  pkill -P "$(echo $emupid | tr ' ' ',')"
                  kill "$emupid"
                  wait "$emupid"
                  sleep 5 # maybe it can be lesser
              fi
              
              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              C 1 Reply Last reply 12 Oct 2017, 16:24 Reply Quote 1
              • L
                lostless
                last edited by 12 Oct 2017, 01:16

                @meleu it works!!!!!! but now it looks like i blew out the gpio pin for my reset button. NOOOOOOOOOOOOOOOOO. That what i get for using a different build without gpio setup. GPIO DANGEROUS TO USE if not setup?

                M 1 Reply Last reply 12 Oct 2017, 01:30 Reply Quote 0
                • M
                  meleu @lostless
                  last edited by 12 Oct 2017, 01:30

                  @lostless sorry, I didn't understand your last question...

                  • Useful topics
                  • joystick-selection tool
                  • rpie-art tool
                  • achievements I made
                  L 1 Reply Last reply 12 Oct 2017, 01:35 Reply Quote 0
                  • L
                    lostless @meleu
                    last edited by lostless 10 Dec 2017, 17:43 12 Oct 2017, 01:35

                    @meleu has nothing to do with the script. that works . i was testing with another memory card without my gpio setup so i had 3.3v through a 10k resistor to the gpio. i think i burned out my gpio pins
                    Permissions issue I think. Reinstalled and gpio is now working

                    M 1 Reply Last reply 13 Oct 2017, 00:44 Reply Quote 0
                    • C
                      cyperghost @meleu
                      last edited by 12 Oct 2017, 16:24

                      @meleu ;) So you see ... PID numbers are better to handle ;)
                      But I think in the kodi-case a simple pkill kodi would be better. Or am I wrong? Sorry I never will get the result as I never will install Kodi on my Pi alongside with RetroPie ;)

                      1 Reply Last reply Reply Quote 0
                      • M
                        meleu @lostless
                        last edited by meleu 13 Oct 2017, 00:44

                        @lostless hey man, would you be kind enough to test this version?:

                        #!/bin/bash
                        # the "sed" command below isn't a crypted message, it's just a Regular Expression
                        # If you are very curious, feel free to ask.
                        emucall="$(sed '4!d; s/\([\\"]\|[[:alnum:]_]\+=[^ ]* \)//g; s/[][(){}^$*.|+? ]/\\&/g' /dev/shm/runcommand.info)"
                        # If there's an emulator running, we need to kill it and go back to ES
                        if [[ -n "$emucall" ]]; then
                        emupid="$(pgrep -f "$emucall" | tr '\n' ' ')"
                        pkill -P "$(echo $emupid | tr ' ' ',')"
                        kill "$emupid"
                        wait "$emupid"
                        sleep 5 # maybe it can be lesser
                        fi

                        Thanks in advance.

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        L 1 Reply Last reply 13 Oct 2017, 03:08 Reply Quote 1
                        • L
                          lostless @meleu
                          last edited by 13 Oct 2017, 03:08

                          @meleu sorry, not working
                          debug output

                          /home/pi/exit.sh: line 4: unexpected EOF while looking for matching `)'
                          /home/pi/exit.sh: line 14: syntax error: unexpected end of file
                          
                          M 1 Reply Last reply 13 Oct 2017, 03:09 Reply Quote 0
                          • M
                            meleu @lostless
                            last edited by meleu 13 Oct 2017, 03:09

                            @lostless ooops! my fault. I edited the script above fixing the problem. can you please try again.

                            • Useful topics
                            • joystick-selection tool
                            • rpie-art tool
                            • achievements I made
                            L 1 Reply Last reply 13 Oct 2017, 03:14 Reply Quote 1
                            • L
                              lostless @meleu
                              last edited by 13 Oct 2017, 03:14

                              @meleu all good.

                              M 1 Reply Last reply 13 Oct 2017, 03:15 Reply Quote 0
                              • M
                                meleu @lostless
                                last edited by 13 Oct 2017, 03:15

                                @lostless does it mean it works? :)

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                L 1 Reply Last reply 13 Oct 2017, 03:15 Reply Quote 0
                                • L
                                  lostless @meleu
                                  last edited by 13 Oct 2017, 03:15

                                  @meleu yes its working

                                  M 1 Reply Last reply 13 Oct 2017, 03:16 Reply Quote 2
                                  • M
                                    meleu @lostless
                                    last edited by 13 Oct 2017, 03:16

                                    @lostless thanks man! ;-)

                                    • Useful topics
                                    • joystick-selection tool
                                    • rpie-art tool
                                    • achievements I made
                                    L 1 Reply Last reply 13 Oct 2017, 03:17 Reply Quote 2
                                    • L
                                      lostless @meleu
                                      last edited by 13 Oct 2017, 03:17

                                      @meleu My nespi is practically done. The reset is working wonderfully,

                                      1 Reply Last reply Reply Quote 1
                                      251 out of 251
                                      • First post
                                        251/251
                                        Last post

                                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                                        This community forum collects and processes your personal information.
                                        consent.not_received