chore: rename Go module to directory-cleaner and add NSSM scripts for

Windows service deployment
This commit is contained in:
2025-08-07 11:00:16 +02:00
parent 14a8858de6
commit c85208f884
3 changed files with 12 additions and 1 deletions

0
deploy_nssm.sh Normal file
View File

2
go.mod
View File

@@ -1,4 +1,4 @@
module main module directory-cleaner
go 1.23.6 go 1.23.6

11
nssm.sh Normal file
View File

@@ -0,0 +1,11 @@
nssm install DirectoryCleanerTmp C:\Users\Administrator\go\bin\directory-cleaner.exe
nssm set DirectoryCleanerTmp AppParameters "-interval 20s"
nssm set DirectoryCleanerTmp AppEnvironmentExtra ARCHIVE_THRESHOLD=12h DELETE_THRESHOLD=2d
nssm set DirectoryCleanerTmp AppDirectory C:\tmp
nssm set DirectoryCleanerTmp AppExit Default Restart
nssm set DirectoryCleanerTmp AppStdout C:\tmp\cleaner.log
nssm set DirectoryCleanerTmp AppStderr C:\tmp\cleaner.log
nssm set DirectoryCleanerTmp DisplayName DirectoryCleanerTmp
nssm set DirectoryCleanerTmp ObjectName LocalSystem
nssm set DirectoryCleanerTmp Start SERVICE_AUTO_START
nssm set DirectoryCleanerTmp Type SERVICE_WIN32_OWN_PROCESS