RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Script doesn't boot when I start my Retropie

    Scheduled Pinned Locked Moved Help and Support
    retropiebootscriptbooting scriptstartup
    7 Posts 4 Posters 1.7k 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.
    • R
      retropier
      last edited by

      Best Pie'rs,

      I created a script, which works when I run it, but doesn't work when I boot Retropie.
      The script looks as following:

      #!/bin/sh
      expressvpn connect
      echo "expressvpn connect"
      

      This script is located in cd /etc/init.d/expressconnect.sh
      I used the following command for my script:

      sudo chmod +x /etc/init.d/expressconnect.sh
      

      However, when I boot my Raspberry Pi 3 B+, it doesn't seem to work.

      Anyone who wants to help this noobie? :)

      mituM 1 Reply Last reply Reply Quote 0
      • jamesnjJ
        jamesnj
        last edited by

        The latest raspian is a Linux distro that uses systemd ... so it would be better to integrate it with that, however installing custom systemd scripts are not for the noobie.

        Instead of /etc/init.d, try placing your script into either /etc/rc3.d or /etc/rc5.d ... I don't remember which directory is referenced first for the legacy boot script support. It doesn't hurt to put it in both. You will also need to re-name your script to be prefixed with S and a number, something like S99expressconnect

        If the file is executable and starts with #!/bin/bash then no need for the .sh suffix.

        I hope this helps

        R 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @retropier
          last edited by

          @retropier That's not the way to make a script run at boot or make it run as a 'service'. If you follow their (ExpressVPN) install instructions, the package they ask you to install is already providing a service to be run automatically.
          After you activate your VPN, try running sudo systemctl enable expressvpn and reboot, then check if the VPN service has started automatically.

          R 1 Reply Last reply Reply Quote 1
          • R
            retropier @mitu
            last edited by

            @mitu Firstly, I am well aware of the command expressvpn autoconnect true. I tried this command and it's set as enabled. Altough when I reboot, it just won't work. I contacted ExpressVPN multiple times, yet nobody who could help me.

            Also, I followed your instruction: expressvpn connect, it connected. Then I typed sudo systemctl enable expressvpn and rebooted. Still, it is not working for me :(

            mituM 1 Reply Last reply Reply Quote 0
            • R
              retropier @jamesnj
              last edited by

              @jamesnj Instead of /etc/init.d/, I now put the files (named S99expressconnect), in these dictionaries. But it still won't work :(
              I tried so many things... I'm too noob for this

              1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @retropier
                last edited by

                @retropier Ask the package supplier to provide a correct systemd startup file. They seem to distribute one, but it seems it's not working.
                Alternatively, you can add your start-up script in /etc/rc.local, but make sure the script goes into background, otherwise you'll block the boot process.

                1 Reply Last reply Reply Quote 0
                • chipsnblipC
                  chipsnblip
                  last edited by

                  someone asked about this on reddit a few weeks back, and i told them to add it to:
                  /opt/retropie/configs/all/autostart.sh

                  expressvpn connect &
                  emulationstation

                  it seemed to work for them. here's the thread for reference.

                  1 Reply Last reply Reply Quote 2
                  • First post
                    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.