View sentry_install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo passwd root; | |
su - root; | |
sudo adduser sentry ; adduser sentry sudo; | |
su - sentry; | |
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get install build-essential python-dev; | |
apt-get install curl | |
curl -O http://python-distribute.org/distribute_setup.py | |
sudo python distribute_setup.py ; rm distribute* |
View mailservers.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install postfix -y && sudo apt-get install dovecot-imapd dovecot-pop3d -y |
View config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
vagrantfile-local: | |
vm: | |
box: puphpet/ubuntu1404-x64 | |
box_url: puphpet/ubuntu1404-x64 | |
hostname: '' | |
memory: '512' | |
cpus: '1' | |
chosen_provider: virtualbox | |
network: |
View sql_restore.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#restauracion de db en mysql | |
#mysql --host [servername] -u root -p[root_password] [database_name] < dumpfilename.sql | |
#restauracion de db en postgresql | |
#pgdump -h [servername] -U [user] -d your_db_name < dbbackup | |
View mysql_dump.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BACKUP_DIR=/home/backup | |
#descargamos la db | |
mysqldump --host servername -u root -p (rootpass) dbtodump > dumpfile.sql | |
# para descargar una sola tabla sin descargar toda la db usariamos : | |
# mysqldump -u root -p rootpass dbname table_name \ /home/backup/table.sql | |
#para descargarlas todas: |
View crontab_example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# min hor diames diasem comand | |
00 00 * * * sh /home/backup/pgbackup.sh | |
#ejemplo de backup diario con postgresql a las 00 tirando desde el script pgbackup.sh |
View sentry.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/supervisor/conf.d/sentry.conf | |
program:sentry-web] | |
directory=/home/sentry/ | |
command=/home/sentry/.virtualenvs/sentry_env/bin/sentry start http | |
autostart=true | |
autorestart=true | |
redirect_stderr=true |
View sentry.conf.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/home/sentry/.sentry/ | |
# This file is just Python, with a touch of Django which means you | |
# you can inherit and tweak settings to your hearts content. | |
from sentry.conf.server import * | |
import os.path | |
CONF_ROOT = os.path.dirname(__file__) |
View sentry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/nginx/sites-available/ | |
server { | |
# listen on port 80 | |
listen 80; | |
# for requests to these domains | |
server_name logs.devopen.com; | |
# keep logs in these files |
View pgbackup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BACKUP_DIR=/home/sentry/backup | |
cd $BACKUP_DIR | |
#Exportamos la base de datos | |
pg_dump -h direccion_ip -U user -d your_sentry_db_name > dbbackup.sql | |
#compresion de base de datos | |
tar -cf $BACKUP_DIR/bd$(date +%d-%m-%y_%H:%M).tar dbbackup.sql |