mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 11:22:42 -06:00
removed daemon execution, added new script to execute daemon
This commit is contained in:
parent
5938ee0a15
commit
8c5359957c
2 changed files with 13 additions and 6 deletions
|
@ -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
|
||||
|
|
12
windows_reregister.ps1
Normal file
12
windows_reregister.ps1
Normal 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
|
||||
}
|
Loading…
Reference in a new issue