1
0
Fork 0

add zabbix

This commit is contained in:
VirtuBox 2019-11-14 16:04:09 +01:00
parent 4e2cdec72b
commit 4759c36f02
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
1 changed files with 11 additions and 2 deletions

View File

@ -495,9 +495,9 @@ _FTP_ADD() {
fi
ftpaccountpass=$(_PWGEN)
if [ -d /var/www/"$2"/htdocs ]; then
$NEED_SUDO useradd -d /var/www/"$2"/htdocs -M -s /bin/false -G www-data "$1"
$NEED_SUDO useradd -d "/var/www/$2/htdocs" -M -s /bin/false -G www-data "$1"
echo "$1:$ftpaccountpass" | $NEED_SUDO chpasswd -m
chmod -R g+rw /var/www/"$2"/htdocs
chmod -R g+rw "/var/www/$2/htdocs"
echo -e "\n\n [/var/www/$2/htdocs]" | tee -a "$HOME/.ftpaccounts"
echo -e "user : $1" | tee -a "$HOME/.ftpaccounts"
echo "password : $ftpaccountpass" | tee -a "$HOME/.ftpaccounts"
@ -648,6 +648,14 @@ _SETUP_CONTROLLER() {
}
_ZABBIX_UPDATE() {
local distro
distro="$(lsb_release -si)"
wget -O /tmp/zabbix.deb https://repo.zabbix.com/zabbix/4.2/"${distro,,}"/pool/main/z/zabbix-release/zabbix-release_4.4-1+"$(lsb_release -sc)"_all.deb
dpkg -i /tmp/zabbix.deb
rm -f /tmp/zabbix.deb
}
# enable color support of ls and also add handy aliases
# some more ls aliases
#alias wp='/usr/bin/wp --allow-root'
@ -724,3 +732,4 @@ alias upgrade-wo-full=_WO_FULL_UPGRADE
alias speedtestnet="_run _SPEEDTEST 'Installing speedtest'"
alias SSETUP=_SETUP_CONTROLLER
alias journalctfail='journalctl -b -p err -S "yesterday"'
alias zabbix-update=_ZABBIX_UPDATE