nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
- A) Crear la carpeta
nginx.service.d
:
Generar contraseña desde la consola de linux, agregando esta funcion en el .bashrc
genpasswd() {
local l=$1
[ "$l" == "" ] && l=20
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
#!/bin/bash | |
clear | |
echo | |
echo LISTADO DE DOMINIOS ACTIVADOS: | |
echo | |
du -shc /var/www/vhosts/* > ~/listado-dominios | |
perl -pi -e "s[/var/www/vhosts/][-> ]g" ~/listado-dominios | |
cat ~/listado-dominios | |
rm -f ~/listado-dominios | |
echo |
Source: https://github.com/bcit-ci/CodeIgniter/wiki/Compress-HTML-output
To remove useless whitespace from generated HTML, except for Javascript see [Regex Source] or just replace the $re
value:
$re = '%# Collapse ws everywhere but in blacklisted elements.
(?> # Match all whitespaces other than single space.
[^\S ]\s* # Either one [\t\r\n\f\v] and zero or more ws,
| \s{2,} # or two or more consecutive-any-whitespace.
) # Note: The remaining regex consumes no text at all...
-Crear Nuevo archivo
sudo nano /usr/local/bin/startkodi
-Pegar lo siguiente:
#!/bin/bash
fbset_bin=`which fbset`
xset_bin=`which xset`
xrefresh_bin=`which xrefresh`
root@myserver:~# dd if=/dev/zero of=/swap.dat bs=1024 count=512k | |
root@myserver:~# mkswap /swap.dat | |
root@myserver:~# swapon /swap.dat | |
root@myserver:~# nano /etc/fstab | |
agregar: | |
/swap.dat none swap sw 0 0 | |
root@myserver:~# nano /etc/mysql/my.cnf |