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?

Landmine
  • 121
  • 1
    how about https://ubuntu101.co.za/security/vpn/expressvpn-automate-connection-switching-linux/ They use a script there with some extra options. – Rinzwind Feb 01 '20 at 08: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 01 '20 at 09: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 01 '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 01 '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 04 '20 at 20:57
  • Does this answer your question? How to run scripts on start up? – karel May 18 '20 at 00:25

2 Answers2

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.

huberu
  • 1