Website : rimsha.abasa.com
backdoor
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
lib
/
dpkg
/
info
/
Filename :
mattermost.preinst
back
Copy
#!/usr/bin/env bash TRUE_REG='^([tT][rR][uU][eE]|[yY]|[yY][eE][sS]|1)$' FALSE_REG='^([fF][aA][lL][sS][eE]|[nN]|[nN][oO]|0)$' IS_UPGRADE=false IS_DEBUG=${IS_DEBUG:-false} if [[ $IS_DEBUG =~ $TRUE_REG ]]; then set -o xtrace fi IS_STRICT=${IS_STRICT:-false} if [[ $IS_STRICT =~ $TRUE_REG ]]; then set -o errexit set -o nounset set -o pipefail fi case "$1" in upgrade) systemctl stop mattermost # If $1=configure and $2 is set, this is an upgrade if [ "$2" != "" ]; then IS_UPGRADE=true fi if [[ "$IS_UPGRADE" =~ $TRUE_REG ]]; then # Cleaning up old files find /opt/mattermost/ /opt/mattermost/client/ -mindepth 1 -maxdepth 1 \! \( -type d \( -path /opt/mattermost/client -o -path /opt/mattermost/client/plugins -o -path /opt/mattermost/config -o -path /opt/mattermost/logs -o -path /opt/mattermost/plugins -o -path /opt/mattermost/data -o -path /opt/mattermost/mmomni \) -prune \) -exec rm -r {} \; fi ;; esac