Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Solved recalbox external startscript do not start

    Recalbox General
    recalbox external startscript start
    3
    6
    2572
    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.
    • rapid
      rapid last edited by

      Hello,
      I try to execute an external startscript.

      What I tried is to edit
      nano /recalbox/share/system/custom.sh

      and place there my script.

      If I execute ./custom.sh in shell it starts and I see the proceses in "top"

      and the script works. After rebooting I can't see the proceses in "top"

      I tried to switch order in /etc/init.d and move S99custom to S31custom or S04 custom
      but after reboot nothing happens. If I execute ./S04custom manually it starts and all looks good.

      Places I already checked while trying to solve my problem
      https://github.com/recalbox/recalbox-os/wiki/Add-your-own-startup-script-(EN)
      https://forum.recalbox.com/topic/4370/help-with-starting-an-automatic-script-on-start-up
      but didn't work for me.

      Why is my startscript not executing on start?
      Any idears?

      1 Reply Last reply Reply Quote 1
      • Substring
        Substring last edited by

        chmod u+x ~/custom.sh?

        Former dev - Please reply with @substring so that i am notified when you answer me
        Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

        1 Reply Last reply Reply Quote 0
        • rapid
          rapid last edited by

          ~/custom.sh is set to 755 owner avahi:root

          the script in custom.sh is following:

          #################################################

          #!/bin/sh
          #/recalbox/share/system/custom.sh
          cd
          cd StromPi2
          python powershutdown.py &
          python poweralarm.py &

          ################################################

          The rest of this works if I start it manually. The reason for this is that this way I could turn of my physical power switch and my pi shutdown with a little battery himself. 😉

          I'll keep on searching and hope I will get it to work but thx @Substring

          Substring 1 Reply Last reply Reply Quote 0
          • Substring
            Substring @rapid last edited by

            @rapid chown root ~/custom.sh because i don't see any reason why any script should belong to avahi
            Don't cd in a init script, you should be explicit on the path because $HOME can be unset at init. So just cd is probably in /usr/bin, you'd better cd /recalbox/share/system/StormPi2

            Former dev - Please reply with @substring so that i am notified when you answer me
            Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

            1 Reply Last reply Reply Quote 0
            • rapid
              rapid last edited by

              Ok. Shame on me 😄

              To make a long storry short.
              This works. Thx a lot. @Substring 😉

              It's been a while since I made scripts, so I just tried it the "old dos" way...

              So it's solved (still searching the button for solved)

              1 Reply Last reply Reply Quote 0
              • Andrei
                Andrei last edited by

                i know this post is old but i was looking for this to run my LED buttons when PI is booting. Finally i managed to get it working

                I copy the script file in "/recalbox/share/system" then i fallow Substring recommendation

                my custom scrypt is looking like this:

                #################################################

                #!/bin/sh
                #/recalbox/share/system/custom.sh
                cd /recalbox/share/system/
                python relay1.py&

                ################################################

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Want to support us ?

                79
                Online

                98.6k
                Users

                28.1k
                Topics

                187.0k
                Posts

                Copyright © 2021 recalbox.com