Primeiro crie a regra para ocorrer após atualizar o cpanel também executar
cat > /root/fix_roundcube_larry.sh <<'EOF'
#!/bin/bash
RC_PATH="/usr/local/cpanel/base/3rdparty/roundcube"
SKINS="$RC_PATH/skins"
CFG="$RC_PATH/config/config.inc.php"
# instalar larry se não existir
if [ ! -d "$SKINS/larry" ]; then
cd "$SKINS" || exit 1
git clone https://github.com/roundcube/larry.git larry
fi
# permissões
chown -R root:root "$SKINS/larry"
find "$SKINS/larry" -type d -exec chmod 755 {} \;
find "$SKINS/larry" -type f -exec chmod 644 {} \;
# limpar config antigo
sed -i "/\\$config\\['skins_allowed'\\]/d" "$CFG"
sed -i "/\\$config\\['skin'\\]/d" "$CFG"
# adicionar novamente
echo "\$config['skins_allowed'] = array('elastic', 'larry');" >> "$CFG"
echo "\$config['skin'] = 'larry';" >> "$CFG"
# limpar cache
rm -rf "$RC_PATH/temp/"* 2>/dev/null
# restart
/usr/local/cpanel/scripts/restartsrv_cpsrvd
echo "Larry restaurado com sucesso"
EOF
chmod +x /root/fix_roundcube_larry.sh
Depois reinicie
/root/fix_roundcube_larry.sh
Este artigo foi útil?
Que bom!
Obrigado pelo seu feedback
Desculpe! Não conseguimos ajudar você
Obrigado pelo seu feedback
Feedback enviado
Agradecemos seu esforço e tentaremos corrigir o artigo