Adding a delay? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Zuse
Posts: 4
Joined: Wed Jan 20, 2021 8:38 pm

Adding a delay?

Post by Zuse »

Hi,

Hope everyone is safe, and happy late new year! 8)

I'm trying to add a delay/sleep to transmission. However, I'm having issues finding out how. I have Google it and found:
viewtopic.php?t=7076
viewtopic.php?t=2832
viewtopic.php?t=1439
etc...

My issue is /etc/systemd/system/dietpi-autostart_custom.service doesn't exist and it seems dietpi has dietpi-autostart. I have no idea how it works.

Thanks!
z
User avatar
Joulinar
Posts: 3821
Joined: Sat Nov 16, 2019 12:49 am

Re: Adding a delay?

Post by Joulinar »

Hi,

what exactly is the goal to delay transmission?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Zuse
Posts: 4
Joined: Wed Jan 20, 2021 8:38 pm

Re: Adding a delay?

Post by Zuse »

Joulinar wrote: Fri Jan 22, 2021 10:13 am Hi,

what exactly is the goal to delay transmission?
Hi Joulinar,

Transmission will start before my VPN connects which exposes my real IP, I do have my VPN setup with a killswitch it's just transmission starts up than my VPN.

I was hoping to add a delay to transmission to allow my VPN to connect first, even if my VPN fails to connect (for some unknown reason) the killswitch would kick in till there is a connection, again transmission starts just before the VPN starts up.

Thanks!
User avatar
Joulinar
Posts: 3821
Joined: Sat Nov 16, 2019 12:49 am

Re: Adding a delay?

Post by Joulinar »

well you could try to add your VPN service as dependency to Transmission service. What VPN you are using?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Zuse
Posts: 4
Joined: Wed Jan 20, 2021 8:38 pm

Re: Adding a delay?

Post by Zuse »

Joulinar wrote: Fri Jan 22, 2021 7:26 pm well you could try to add your VPN service as dependency to Transmission service. What VPN you are using?
How would I go about doing this? I'm using Transmission web and I don't have that many options. I'm using PIA (privateinternetaccess)

Thanks
User avatar
Joulinar
Posts: 3821
Joined: Sat Nov 16, 2019 12:49 am

Re: Adding a delay?

Post by Joulinar »

do you know the name of the service pia is using?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Zuse
Posts: 4
Joined: Wed Jan 20, 2021 8:38 pm

Re: Adding a delay?

Post by Zuse »

Joulinar wrote: Fri Jan 22, 2021 7:52 pm do you know the name of the service pia is using?
I'm not sure; I installed my PIA differently from other guides I found here, i.e. viewtopic.php?t=1319, and the git guide ended up with me formatting dietpi and doing a fresh install.

I installed TigerVNC from there I installed the desktop version of PIA
Image

This method has worked a treat, and I can use the VPN killswitch and split tunnel. However, Transmission loads before PIA (which I'm guessing Transmission loads before TigerVNC), and as a result, my real IP shows till PIA kicks in.

I thought it would be easier to add a delay to Transmission to sleep x seconds giving TigerVNC/PIA time to start.

It is not the best method to install the VPN, but it works and is the most simple.

Thanks again
User avatar
Joulinar
Posts: 3821
Joined: Sat Nov 16, 2019 12:49 am

Re: Adding a delay?

Post by Joulinar »

basically you could add a sleep command to Transmission service definition.

Code: Select all

TimeoutStartSec=infinity
ExecStartPre=/bin/sleep 1800
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply