Posts

Install Gitea on NAS Netgear

  Download wget -O gitea https://dl.gitea.io/gitea/1.5.0/gitea-1.5.0-linux-arm-7 && chmod +x gitea Create a user system adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git mkdir -p /home/gitea/{custom,data,indexers,public,log} chown git:git /home/gitea/{data,indexers,log} && chmod 750 /home/gitea/{data,indexers,log} Create folder and copy files mkdir /etc/gitea && chown root:git /etc/gitea && chmod 770 /etc/gitea cp gitea /usr/local/bin/gitea Create file service /etc/systemd/system/gitea.service [Unit] Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target #After=mysqld.service #After=postgresql.service #After=memcached.service #After=redis.service [Service] # Modify these two values and uncomment them if you have # repos with lots of files and get an HTTP error 500 because # of that ### #LimitMEMLOCK=infinity #LimitNOFILE=65535 Restart

Convert time acces log of Squid

  tail -f /var/log/squid3/access.log | grep "192.168.0.1" | perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'

My .conkyrc

  -- commentaires conky.config = { alignment = 'top_right', background = false, border_width = 1, color1 = ffffff, color2 = ffffff, color3 = C12420, draw_borders = false, draw_graph_borders = false, draw_outline = false, draw_shades = false, double_buffer = true, draw_shades = false, draw_outline = false, draw_borders = false, extra_newline = false, --[[ gap_x = 10, gap_y = 80,]] no_buffers = true, out_to_console = false, out_to_stderr = false, own_window_class = Conky, own_window = true, own_window_transparent = true, own_window_argb_visual = true, own_window_type = 'normal', own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', stippled_borders = 0, use_spacer = 'none', update_interval = 1.0, use_xft = true, xftfont = wareebook, } conky.text = [[ INFORMATIONS SYSTEME ${color3}${font caviar dreams:size=9:bold} Hôte :$alignr$nodename Uptime :$alignr$uptime PROCESSEURS ${color3}${font caviar dreams:size

Send mail with from on Linux

  Send mail from mailx -r user@domain.local -s "test send mail" user@domain.dist Send mail if connection root echo "Connection shell root:" `date` `who`| mail -s "`hostname` - connection shell root" destMail Send mail if command fail commande.sh || mail -s "command failed X" destMail

Create volume LVM

  Create a partition on a disk empty parted -s /dev/sdb mklabel msdos parted -s /dev/sdb mkpart primary 1MiB 90% Create a volume LVM on partition pvcreate /dev/sdb1 vgcreate NameVolVg /dev/sdb1 lvcreate -n NameVolLog -l 100%VG NameVolVg Format mkfs.xfs /dev/mapper/NameVolVg-NameVolLog