Reorganize repo: compartmentalize scripts by client/project
Move 150+ scripts from root and scripts/ into client/project directories: - clients/dataforth/scripts/ (110 files: AD2, sync, SSH, DB, DOS scripts) - clients/bg-builders/scripts/ (14 files: Lesley mgmt, Exchange, termination) - clients/internal-infrastructure/scripts/ (10 files: GDAP, Gitea, backups) - projects/msp-tools/scripts/ (9 files: CIPP, MSP onboarding, Datto) - projects/gururmm-agent/scripts/ (3 files: API test, JWT, record counts) - clients/glaztech/scripts/ (1 file: CentraStage removal) Also reorganized: - VPN scripts → infrastructure/vpn-configs/ - Retrieved API/JS files → api/ - Forum posts → projects/community-forum/forum-posts/ - SSH docs → clients/internal-infrastructure/docs/ - NWTOC/CTONW docs → projects/wrightstown-smarthome/docs/ - ACG website files → projects/internal/acg-website-2025/ - Dataforth docs → clients/dataforth/docs/ - schema-retrieved.sql → docs/database/ Deleted 24 tmp_*.ps1 one-off debug scripts (preserved in git history). Root reduced from 220+ files to 62 items (docs + directories only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
50
clients/dataforth/scripts/check-sync-script.ps1
Normal file
50
clients/dataforth/scripts/check-sync-script.ps1
Normal file
@@ -0,0 +1,50 @@
|
||||
# Check the sync script implementation
|
||||
$password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
|
||||
$cred = New-Object System.Management.Automation.PSCredential("INTRANET\sysadmin", $password)
|
||||
|
||||
Write-Host "=== Analyzing Sync Script ===" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock {
|
||||
$scriptPath = "C:\Shares\test\scripts\Sync-FromNAS.ps1"
|
||||
|
||||
Write-Host "[1] Script Push Implementation" -ForegroundColor Yellow
|
||||
Write-Host "=" * 80 -ForegroundColor Gray
|
||||
|
||||
# Find the push/pscp commands
|
||||
$content = Get-Content $scriptPath
|
||||
$inPushSection = $false
|
||||
$lineNum = 0
|
||||
|
||||
foreach ($line in $content) {
|
||||
$lineNum++
|
||||
|
||||
# Look for PUSH section or pscp commands
|
||||
if ($line -match 'PUSH|pscp|Push files|Push File|ERROR.*push') {
|
||||
Write-Host "$lineNum : $line" -ForegroundColor White
|
||||
$inPushSection = $true
|
||||
} elseif ($inPushSection -and $line.Trim() -eq "") {
|
||||
$inPushSection = $false
|
||||
} elseif ($inPushSection) {
|
||||
Write-Host "$lineNum : $line" -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "[2] Check for Failed File Patterns" -ForegroundColor Yellow
|
||||
Write-Host "=" * 80 -ForegroundColor Gray
|
||||
|
||||
# Check if one of the failing files exists on NAS
|
||||
Write-Host "Attempting SSH to NAS to check file presence..." -ForegroundColor Yellow
|
||||
|
||||
# Try to connect to NAS and check
|
||||
$nasCheck = & plink.exe -batch root@192.168.0.9 "ls -la /data/test/TS-11L/ProdSW/HVDATA/hvin.dat 2>&1" 2>&1
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "File EXISTS on NAS:" -ForegroundColor Green
|
||||
Write-Host $nasCheck -ForegroundColor White
|
||||
} else {
|
||||
Write-Host "File check result:" -ForegroundColor Red
|
||||
Write-Host $nasCheck -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user