config file

This commit is contained in:
lda
2026-05-03 03:11:35 +07:00 Verified
parent b850c218ec
commit f5ed1ab8f6
6 changed files with 191 additions and 45 deletions
+9 -5
View File
@@ -7,6 +7,8 @@ param(
$PASSWD = Get-DefaultPassword $PASSWD
Write-Output $PSScriptRoot
# idk what this does it works like that then thats how it is
pscp.exe -l root -scp -pw $PASSWD -r 192.168.100.1:/etc/ldlda_help $PSScriptRoot
pscp.exe -l root -scp -pw $PASSWD 192.168.100.1:/etc/rc.local $PSScriptRoot
@@ -23,13 +25,15 @@ New-Item -ItemType Directory -Force -Path $initDir | Out-Null
$files = "update_wakey" , "wakey" , "update_tailscale" , "wireguard_setup", "lda-override"
$remote = $files.ForEach({ "/etc/init.d/$_" })
$remote | ForEach-Object {
pscp.exe -l root -scp -pw $PASSWD "192.168.100.1:$_" "$initDir\"
pscp.exe -l root -scp -pw $PASSWD "192.168.100.1:$_" "$initDir/"
}
$hotplugDir = Join-Path $PSScriptRoot 'hotplug.d'
New-Item -ItemType Directory -Force -Path $hotplugDir | Out-Null
$files = "dhcp/95-wakey", "neigh/95-wakey"
$remote = $files.ForEach({ "/etc/hotplug.d/$_" })
$hotplugDir = Join-Path $PSScriptRoot 'hotplug.d'
$remote | ForEach-Object {
pscp.exe -l root -scp -pw $PASSWD "192.168.100.1:$_" "$hotplugDir\"
$files | ForEach-Object {
New-Item -ItemType Directory -Force -Path (Split-Path "$hotplugDir/$_")
pscp.exe -l root -scp -pw $PASSWD "192.168.100.1:/etc/hotplug.d/$_" "$hotplugDir/$_"
}