1

I want to issue this command every-time the computer boots

expressvpn connect

I've tried making it into a service and adding it to the crontab with no luck. Maybe it's late or maybe I'm really not understanding my new Linux friend and how he works.

My crontab looks like this

@reboot expressvpn connect

After reading some comments, I believe it is not working due to me not providing the full path. How can I determine the full path?

  • 1
    how about ubuntu101.co.za/security/vpn/… They use a script there with some extra options. – Rinzwind Feb 1 '20 at 8:59
  • 1
    Did you to provide the full path to the expressvpn command during your attempts to make it work? Otherwise provide the detail of what you tried (add that to your question, use "Edit") so 1) people can learn and 2) helpers can see what you may be doing wrong. – vanadium Feb 1 '20 at 9:19
  • I'll read over that site and see if they can help me where I missed a step. Also I added more detail to the original question. – Landmine Feb 1 '20 at 16:48
  • that site made a mistake: always use full paths to commands in crontab. that is often the issue when cron does not work ;) – Rinzwind Feb 1 '20 at 16:52
  • Is there a way to determine what the full path is when you have only been provided a single line command? – Landmine Feb 4 '20 at 20:57
1

"expressvpn connect" doesn't work on reboot as there's no previous connection for the session, you'd need to either specify the server or use the "smart" connection type. The crontab entry to connect to the fastest server would then be @reboot /usr/bin/expressvpn connect smart.

0

You can try which expressvpn which will tell you where the binary is located. This is /usr/bin/expressvpn by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.