diff --git a/windows_installer.ps1 b/windows_installer.ps1 index 42370b4..935a40d 100644 --- a/windows_installer.ps1 +++ b/windows_installer.ps1 @@ -64,9 +64,4 @@ $phoneIpVariable = Set-Variable -Name phoneIp -Value $phoneIp -Scope Global # Execute the `python demo.py` script with the phone IP address passed as a parameter. Write-Output "Registering" -python demo.py --phone $phoneIpVariable - -# Execute the daemon for reregistration -Write-Output "Executing the daemon" -python demo.py --daemon - +python demo.py --phone $phoneIpVariable diff --git a/windows_reregister.ps1 b/windows_reregister.ps1 new file mode 100644 index 0000000..7194278 --- /dev/null +++ b/windows_reregister.ps1 @@ -0,0 +1,12 @@ +cd "$env:USERPROFILE\pypush" + +# Activate the virtual environment +. "$env:USERPROFILE\AppData\Local\Python\VirtualEnvs\pypush\Scripts\activate.ps1" + +# Continuously run the demo script in daemon mode +while ($true) { + python ./demo.py --daemon + + # If the script disconnects, wait 5 minutes before restarting + Start-Sleep -Seconds 300 +} \ No newline at end of file