Recent content by Fr3d

  1. F

    VPN on/off via cron script

    Well done it works like magic, first time. Here is the vpnon.sh #!/bin/sh service stop_vpnclient1 service stop_vpnclient2 service stop_vpnclient3 # Generate a number between BASE and N, ie.1 and 3 to choose which vpnclient is started let N=3 #number of configured vpnclients to choose from...
  2. F

    VPN on/off via cron script

    I have put your new algorithm into a loop with a 'sleep 1s' and run it on my mint19 laptop. Works like a charm with good spread of randomness. Thank you, if I can get it to work on the router I think I'm home and dry!! I only need to choose a random vpn server once a day. 8 ones 10 twos 7 threes...
  3. F

    VPN on/off via cron script

    You guys are so far ahead of me, I was ready to call it a day. Took me all day to get this far. I was testing on my Mint laptop. I don't understand the random generator but I was getting a nice spread of random numbers. Then "od not found" on the RT-AC86U stopped me dead. My vpnon.sh looks like...
  4. F

    VPN on/off via cron script

    Thank you, I have made those improvements for future readers. I actually have 3 vpnclients configured on the AC86U and I want to start a random one each morning. I guess I need to generate a random number between 1 and 3 and then use a case statement to start one vpnclient at 7:01am. option=$((...
  5. F

    VPN on/off via cron script

    Thanks that has helped a lot. I feel like a real chop for not finding those links myself. I will read up on cru and service command and the other options to access the vpn clients. I created 3 files in /jffs/scripts services-start, vpnon.sh, vpnoff.sh services-start contains 2 cru commands...
  6. F

    VPN on/off via cron script

    RT-AC86U running AsusWRT Merlin v 384.9 I would like to disconnect VPN client at midnight and then reconnect VPN at 7am. Can somebody please give me some pointers to where I can learn to do this? Can somebody please explain how the VPN features are exposed to the cron script variables?
Back
Top