mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 13:53:42 +02:00
Added comment-based help
This commit is contained in:
@ -1,19 +1,17 @@
|
||||
#!/snap/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./simulate-presence.ps1 [<IP-address>]
|
||||
.DESCRIPTION simulates the human presence against burglars
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
# Syntax: ./simulate-presence.ps1
|
||||
# Description: simulates the human presence against burglars
|
||||
# Author: Markus Fleschutz
|
||||
# Source: github.com/fleschutz/PowerShell
|
||||
# License: CC0
|
||||
param([string]IPaddress)
|
||||
|
||||
function SwitchLight {
|
||||
for ([int]$i = 0; $i -lt 1000; $i++) {
|
||||
./switch-shelly1 $IPaddress on 0
|
||||
sleep 60
|
||||
./switch-shelly1 $IPaddress off 0
|
||||
sleep 10
|
||||
}
|
||||
|
||||
|
||||
|
||||
SwitchLight 1
|
||||
sleep 60
|
||||
SwitchLight 0
|
||||
sleep 10
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user