{
    "version": "1.12.6",
    "description": "Open-source FTP server software",
    "homepage": "https://filezilla-project.org/",
    "license": "GPL-2.0-or-later",
    "notes": [
        "The DEFAULT settings for server interface is--Host: 127.0.0.1, Port: 14148, Password: (empty)",
        "If you are upgrading from old versions (before ver 1.0), run the following command (under Admin) to migrate config files:",
        "filezilla-server-config-converter (path to old 'FileZilla Server.xml') \"$(Env:SystemRoot$)\\System32\\config\\systemprofile\\AppData\\Local\\filezilla-server\""
    ],
    "architecture": {
        "64bit": {
            "url": "https://packages.chocolatey.org/filezilla.server.1.12.6.nupkg",
            "hash": "af04bfcc64aa7140ad92cd9f602f52714d1ffcee5cc1803e3c80c45ac019fe39"
        }
    },
    "extract_dir": "tools",
    "pre_install": [
        "if (!(is_admin)) {error 'This package requires admin rights to install'; break}",
        "Expand-7zipArchive \"$dir\\FileZilla_Server_*_win64-setup.exe\" \"$dir\" -Removal",
        "Remove-Item \"$dir\\`$PLUGINSDIR\", \"$dir\\*.ps1\", \"$dir\\*.xml\" -Force -Recurse",
        "Set-Content \"$dir\\start-filezilla-server.bat\" \"net start `\"FileZilla Server`\"\" -Encoding ascii",
        "Set-Content \"$dir\\stop-filezilla-server.bat\" \"net stop `\"FileZilla Server`\"\" -Encoding ascii"
    ],
    "post_install": [
        "Write-Host 'Installing FileZilla Server service...'",
        "sc.exe create \"FileZilla Server\" \"binPath=$dir\\filezilla-server.exe\" start=auto",
        "net start \"FileZilla Server\""
    ],
    "uninstaller": {
        "script": [
            "if (!(is_admin)) {error 'This package requires admin rights to uninstall'; break}",
            "Write-Host 'Removing FileZilla Server service...'",
            "Stop-Process -Name 'filezilla-server-gui' -ErrorAction SilentlyContinue",
            "net stop \"FileZilla Server\"",
            "sc.exe delete \"FileZilla Server\""
        ]
    },
    "bin": [
        "filezilla-server.exe",
        "filezilla-server-config-converter.exe",
        "filezilla-server-crypt.exe",
        "filezilla-server-impersonator.exe"
    ],
    "shortcuts": [
        [
            "filezilla-server-gui.exe",
            "FileZilla Server Interface"
        ],
        [
            "start-filezilla-server.bat",
            "Start FileZilla Server",
            "",
            "filezilla-server.exe"
        ],
        [
            "stop-filezilla-server.bat",
            "Stop FileZilla Server",
            "",
            "filezilla-server.exe"
        ]
    ],
    "checkver": {
        "url": "https://community.chocolatey.org/packages/filezilla.server",
        "regex": "<meta property=\"og:title\" content=\"FileZilla Server ([\\d.]+)\">"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://packages.chocolatey.org/filezilla.server.$version.nupkg",
                "hash": {
                    "url": "https://community.chocolatey.org/packages/filezilla.server/$version",
                    "regex": "$sha256.*?$basename"
                }
            }
        }
    }
}
