aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/conf/etc/logrotate.conf13
-rw-r--r--tools/conf/etc/skel/.vimrc14
-rw-r--r--tools/conf/etc/syslog-ng.conf7
-rw-r--r--tools/postgresql.html4
4 files changed, 26 insertions, 12 deletions
diff --git a/tools/conf/etc/logrotate.conf b/tools/conf/etc/logrotate.conf
index 636dffb..549bd7f 100644
--- a/tools/conf/etc/logrotate.conf
+++ b/tools/conf/etc/logrotate.conf
@@ -219,6 +219,15 @@ include /etc/logrotate.d
endscript
}
+/var/log/ntpd {
+ # uncomment this if you want your log files compressed
+ delaycompress
+ compress
+ postrotate
+ /etc/rc.d/syslog-ng reload >/dev/null
+ endscript
+}
+
/var/log/dnsmasq {
# uncomment this if you want your log files compressed
delaycompress
@@ -295,7 +304,7 @@ include /etc/logrotate.d
endscript
}
-/var/log/nginx/tribu_error.log {
+/var/log/nginx/vhost_error {
# uncomment this if you want your log files compressed
delaycompress
compress
@@ -305,7 +314,7 @@ include /etc/logrotate.d
endscript
}
-/var/log/nginx/tribu_access.log {
+/var/log/nginx/vhost_access {
# uncomment this if you want your log files compressed
delaycompress
compress
diff --git a/tools/conf/etc/skel/.vimrc b/tools/conf/etc/skel/.vimrc
index 0a3656d..fb4445f 100644
--- a/tools/conf/etc/skel/.vimrc
+++ b/tools/conf/etc/skel/.vimrc
@@ -34,12 +34,16 @@ set incsearch " do incremental searching
"
"" Switch syntax highlighting on, when the terminal has colors
"" Also switch on highlighting the last used search pattern.
+
+" colorscheme desert
+set t_Co=256
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
set background=dark
colorscheme wombat256mod
" colorscheme desert
+ :hi SpellBad ctermfg=Black guifg=Black
endif
@@ -110,12 +114,10 @@ map <F3> :tabprevious<CR>
map <F4> :tabnext<CR>
"
"" Show Line Numbers
-"" set nu
-"" Show Relative Line Numbers
set relativenumber
-"set complete=.,b,u,]
-"set wildmode=longest,list:longest
-"set completeopt=menu,preview
+set complete=.,b,u,]
+set wildmode=longest,list:longest
+set completeopt=menu,preview
"
"" Directories
set backupdir=~/.vim/backup
@@ -147,7 +149,7 @@ autocmd BufWinLeave * call clearmatches()
"" Finally, if you want an indent to correspond to a single tab, you should also use:
""set shiftwidth=4
"" For indents that consist of 4 space characters but are entered with the tab key:
-set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
+set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
"set list
"" set past gives problems with tabs
"" set paste
diff --git a/tools/conf/etc/syslog-ng.conf b/tools/conf/etc/syslog-ng.conf
index b6aa817..27c95ba 100644
--- a/tools/conf/etc/syslog-ng.conf
+++ b/tools/conf/etc/syslog-ng.conf
@@ -63,6 +63,7 @@ destination d_messages { file("/var/log/messages"); };
# Custom destinations
destination d_shorewall_warn { file ("/var/log/shorewall/warn"); };
destination d_shorewall_info { file ("/var/log/shorewall/info"); };
+destination d_ntpd { file("/var/log/ntpd"); };
destination d_dnsmasq { file("/var/log/dnsmasq"); };
destination d_postgres { file("/var/log/pgsql"); };
destination d_mysql { file("/var/log/pgsql"); };
@@ -148,14 +149,15 @@ filter f_console { level(warn .. emerg); };
# custom filters
-filter f_dnsmasq { program("^dnsmasq$"); };
+filter f_ntpd { facility(daemon) and program("^ntpd$"); };
+filter f_dnsmasq { facility(daemon) and program("^dnsmasq$"); };
filter f_postgres { facility(local0) and program("^postgresql$"); };
filter f_sshd { facility(auth) and program("^sshd$"); };
filter f_iptables { facility(kern) and match("iptables" value("MESSAGE")) };
filter f_shorewall_warn { level (warn) and match ("Shorewall" value("MESSAGE")); };
filter f_shorewall_info {level (info) and match ("Shorewall" value("MESSAGE")); };
-filter f_gitolite { program("^gitolite$"); };
+filter f_gitolite { facility(daemon) and program("^gitolite$"); };
filter f_git-daemon { program("^git-daemon$"); };
filter f_nginx_error { facility(daemon) and program("^nginx$"); };
filter f_nginx_vhost { facility(daemon) and program("^nginx_vhost$");};
@@ -164,6 +166,7 @@ filter f_php_fpm { facility(daemon) and program("^php-fpm$");};
filter f_php { facility(daemon) and program("^php$");};
# custom logs
+log { source(s_src); filter(f_ntpd); destination(d_ntpd); };
log { source(s_src); filter(f_php_fpm); destination(d_php_fpm); };
log { source(s_src); filter(f_php); destination(d_php); };
log { source(s_src); filter(f_nginx_vhost); destination(d_nginx_vhost); };
diff --git a/tools/postgresql.html b/tools/postgresql.html
index 141d6c2..f27b7d4 100644
--- a/tools/postgresql.html
+++ b/tools/postgresql.html
@@ -274,7 +274,7 @@
<p>Deleting database with dropdb command;</p>
<pre>
- sudo -u postgres dropdb db_name
+ sudo -u postgres dropdb -U postgres db_name
</pre>
<h3 id="listdb">4.3. List databases</h3>
@@ -302,7 +302,7 @@
<p>Restore a database;</p>
<pre>
- $ cat db_name_dump | psql -U user_name -d db_name
+ $ psql -U user_name -d db_name -f db_name_dump
</pre>
<h2 id="psql">5. Psql</h2>