summarylogtreecommitdiffstats
path: root/crowdsec.install
blob: d354663f7a8874dbc9c0a4096a8a012089709179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
post_install() {
    source /usr/share/crowdsec/wizard.sh -n
    SILENT=true detect_services
    SILENT=true TMP_ACQUIS_FILE_SKIP=skip genacquisition

    cscli capi register --error
    cscli machines add --auto --force --error
    cscli hub update
    cscli hub upgrade

    CSCLI_BIN_INSTALLED="/usr/bin/cscli" SILENT=true install_collection
}

pre_upgrade() {
    if [ "$(vercmp "$2" 1.6.0)" -lt 0 ]; then
        echo "Due to significant changes in the package structure, it is strongly advised not"
        echo "to upgrade from any version older than 1.6.0 to a newer version, as this may lead"
        echo "to potential issues. To safely upgrade to the new version, it is recommended to"
        echo "uninstall the old package and perform a clean installation of the new one."
        echo "Additionally, it is recommended to inspect the /usr/local directory and"
        echo "remove all related files to Crowdsec to ensure a clean installation."
    fi
}