BL🅾G News


Actu G33k & admin stuff.

Aucun commentaire

Règler Logcheck pour n'avoir que les rapports UNE fois par jour

alt

 
$  apt-get install  logcheck

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets supplémentaires suivants seront installés :
  libipc-signal-perl libproc-waitstat-perl logcheck-database mime-construct
Paquets suggérés :
  syslog-summary
Les NOUVEAUX paquets suivants seront installés :
  libipc-signal-perl libproc-waitstat-perl logcheck logcheck-database mime-construct
0 mis à jour, 5 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 221 ko dans les archives.
Après cette opération, 843 ko d'espace disque supplémentaires seront utilisés.

Souhaitez-vous continuer ? [O/n]

Editer le fichier du cron pour n'avoir que les check vers minuit.
Au lieu d'ètre spamé à chaque action!!

nano /etc/cron.d/logcheck


# /etc/cron.d/logcheck: crontab entries for the logcheck package

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

@reboot         logcheck    if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
[b]59 23[/b] * * *       logcheck    if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi

# EOF

by 🅴🆁🆁🅴🆄🆁32
Hosted on

🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼



Aucun commentaire

alt

Fix error rsyslog " rsyslogd-2007: action 'action 17' suspended, next retry is ..."

cat /var/log/syslog | egrep rsyslog

Jun 18 06:25:14 myoueb rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="19466" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 18 06:25:41 myoueb rsyslogd0: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/0 ]
Jun 18 06:25:41 myoueb rsyslogd-2359: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/2359 ]
Jun 18 07:39:01 myoueb rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jun 18 07:39:31 2017 [try http://www.rsyslog.com/e/2007 ]
 
# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
# 
#    $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
#      busy site..
#
daemon.*;mail.*;\
    news.err;\
    *.=debug;*.=info;\
    *.=notice;*.=warn   |/dev/xconsole 
 $ sed -i '/# The named pipe \/dev\/xconsole/,$d' /etc/rsyslog.conf


Aucun commentaire

How to fix PuTTY showing bad characters

If you have bad character in your terminal like this:

i

You can try :

- In Putty software check first if everything is configured fine :
i
i
AND if it's not working try THIS :


export NCURSES_NO_UTF8_ACS=1

Put it into ~/.bash_profile

or
~/.bashrc

or directly in

/etc/profile.d

and now the result: :) :

With MC:
i
With ptop:
i
or with bmon:
i

enjoy ;)

by 🅴🆁🆁🅴🆄🆁32
Hosted on

🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼



Aucun commentaire

alt

Script for dealing with creating Postgres databases that complain with:

PG::InvalidParameterValue: ERROR: encoding UTF8 does not match locale en_US
DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1.

when trying to create the production DB with :

RAILS_ENV=production bundle exec rails db:setup

FIX :


 su  - postgres

psql

update pg_database set datistemplate=false where datname='template1';
drop database Template1;
create database template1 with owner=postgres encoding='UTF-8'
  lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;

update pg_database set datistemplate=true where datname='template1';

screen:

 su - postgres
postgres@echosystem:~$ psql -U postgres
psql (9.4.9)
Type "help" for help.

postgres=# update pg_database set datistemplate=false where datname='template1';
UPDATE 1
postgres=# drop database Template1;
DROP DATABASE
postgres=# create database template1 with owner=postgres encoding='UTF-8'
postgres-#   lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
CREATE DATABASE
postgres=# update pg_database set datistemplate=true where datname='template1';
UPDATE 1
postgres=#

Enjoy !!

ref: https://gist.github.com/turboladen/6790847

by 🅴🆁🆁🅴🆄🆁32
Hosted on

🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼



Aucun commentaire

free.fr

POUR LE TEL FIXE :
Ajouter un numéro ou un préfixe à la liste noire :

Touche *351* < numéro de votre choix > #

(voir la démarche ici : http://www.free.fr/assistance/2177.html)

POUR LE PORTABLE :
Se connecter sur https://mobile.free.fr/moncompte/
puis dans GERER MON COMPTE > MES SERVICES
tout en bas FILTRAGES DES COMMUNICATIONS ENTRANTES
et ajouter le numéro !

Aide:

* Activer le service : *351*#
* Désactiver le service :*351#
* Ajouter le dernier numéro reçu : *351*#
* Insérer un numéro ou un préfixe : #351#
* Vider la liste : #351#
* Vérifier le statut du service : *#351#