OpenFiles/updateFilelist.sh

9 lines
520 B
Bash
Raw Normal View History

2019-05-06 12:13:51 -06:00
#!/bin/sh
/usr/bin/ssh fredw@nrb-02 'powershell.exe -command "& {Get-SmbOpenFile} | ConvertTo-Csv -notype | out-file -encoding UTF8 -filepath files.csv"'
/usr/bin/scp fredw@nrb-02:files.csv /tmp/files.csv
2019-05-06 12:13:51 -06:00
/usr/bin/ssh fredw@nrb-01 'powershell.exe -command "Get-DHCPServerv4scope | Get-DHCPServerv4Lease | ConvertTo-CSV -notype | out-file -encoding UTF8 -filepath dhcp.csv"'
/usr/bin/scp fredw@nrb-01:/home/fredw/dhcp.csv /tmp/dhcp.csv
cd /root/.venv/openfiles && direnv exec . python fileCsv2Json.py >/dev/null 2>&1