mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
cleanup scripts dir
This commit is contained in:
parent
a4a5e16bee
commit
38bc5673c4
4 changed files with 32 additions and 2 deletions
|
|
@ -28,13 +28,18 @@ EndProject
|
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{FCA7F77A-9EC6-4C6D-A80E-7DD27FF95673}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\build.sh = scripts\build.sh
|
||||
scripts\createMySqlDb.sql = scripts\createMySqlDb.sql
|
||||
scripts\cron = scripts\cron
|
||||
scripts\deploy.sh = scripts\deploy.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Agent", "src\FilterLists.Agent\FilterLists.Agent.csproj", "{4F39D132-498D-4A93-9F6C-1C604718300D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sql", "sql", "{A4BB2C81-5232-4162-B410-704D123D2C01}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\sql\createDb.sql = scripts\sql\createDb.sql
|
||||
scripts\sql\snapshotTimeAnalysis.sql = scripts\sql\snapshotTimeAnalysis.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -65,6 +70,9 @@ Global
|
|||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{A4BB2C81-5232-4162-B410-704D123D2C01} = {FCA7F77A-9EC6-4C6D-A80E-7DD27FF95673}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8A31B449-52DD-4445-A9C4-033A24E25308}
|
||||
EndGlobalSection
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
#purge target directory: rm -rf !(appsettings.json)
|
||||
|
||||
#TODO: purge target directory
|
||||
#https://github.com/collinbarrett/FilterLists/issues/135
|
||||
#rm -rf !(appsettings.json)
|
||||
|
||||
#deploy seed data
|
||||
sshpass -p $FTP_PASSWORD scp -o StrictHostKeyChecking=no -r /home/travis/build/collinbarrett/FilterLists/data/ $FTP_USER@$FTP_HOST:$FTP_DIR
|
||||
|
||||
#deploy Agent
|
||||
chmod 777 /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Agent/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/FilterLists.Agent
|
||||
sshpass -p $FTP_PASSWORD scp -o StrictHostKeyChecking=no -r /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Agent/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/* $FTP_USER@$FTP_HOST:$FTP_DIR
|
||||
|
||||
#deploy API
|
||||
chmod a+x /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Api/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/FilterLists.Api.dll
|
||||
sshpass -p $FTP_PASSWORD scp -o StrictHostKeyChecking=no -r /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Api/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/* $FTP_USER@$FTP_HOST:$FTP_DIR
|
||||
sshpass -p $FTP_PASSWORD ssh -o StrictHostKeyChecking=no $FTP_USER@$FTP_HOST 'sudo systemctl restart filterlists.api.service'
|
||||
|
||||
#deploy Web
|
||||
chmod a+x /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Web/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/FilterLists.Web.dll
|
||||
sshpass -p $FTP_PASSWORD scp -o StrictHostKeyChecking=no -r /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Web/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/* $FTP_USER@$FTP_HOST:$FTP_DIR
|
||||
sshpass -p $FTP_PASSWORD ssh -o StrictHostKeyChecking=no $FTP_USER@$FTP_HOST 'sudo systemctl restart filterlists.web.service'
|
||||
|
||||
#purge CDN
|
||||
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$CF_FILTERLISTS_ZONE/purge_cache" -H "X-Auth-Email: $CF_EMAIL" -H "X-Auth-Key: $CF_GLOBAL_API_KEY" -H "Content-Type: application/json" --data '{"purge_everything":true}'
|
||||
9
scripts/sql/snapshotTimeAnalysis.sql
Normal file
9
scripts/sql/snapshotTimeAnalysis.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
SELECT
|
||||
FilterListId,
|
||||
ModifiedDateUtc - CreatedDateUtc,
|
||||
CreatedDateUtc,
|
||||
ModifiedDateUtc,
|
||||
IsCompleted
|
||||
FROM snapshots
|
||||
WHERE ModifiedDateUtc - CreatedDateUtc > 30 OR IsCompleted = 0
|
||||
ORDER BY ModifiedDateUtc - CreatedDateUtc DESC
|
||||
Loading…
Reference in a new issue