removed daemon execution, added new script to execute daemon

This commit is contained in:
Steven Burnham 2023-11-17 19:03:37 -05:00
parent 5938ee0a15
commit 8c5359957c
No known key found for this signature in database
GPG key ID: D765679712A2FC3D
2 changed files with 13 additions and 6 deletions

View file

@ -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. # Execute the `python demo.py` script with the phone IP address passed as a parameter.
Write-Output "Registering" Write-Output "Registering"
python demo.py --phone $phoneIpVariable python demo.py --phone $phoneIpVariable
# Execute the daemon for reregistration
Write-Output "Executing the daemon"
python demo.py --daemon

12
windows_reregister.ps1 Normal file
View file

@ -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
}