This file contains hidden or 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 | |
| # centos.sh | |
| $HOSTNAME=`hostname` | |
| $SERVER='mon.sys-tools.net' | |
| # Add required repository | |
| sudo rpm --import http://repo.zabbixzone.com/centos/RPM-GPG-KEY-zabbixzone | |
| sudo rpm -Uvh http://repo.zabbixzone.com/centos/zabbixzone-release-0.0-1.noarch.rpm | |
| # Install last avaliable version of zabbix-agent |
This file contains hidden or 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
| # look and feel | |
| caption always "%{= bb}%{+b w}%h %=%{=b rw} %l %{= db} ${USER}@%H %{= dg}%c" | |
| hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" | |
| # skip the startup message | |
| startup_message off | |
| # go to home dir | |
| chdir |
This file contains hidden or 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
| myorigin = /etc/mailname | |
| smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) | |
| biff = no | |
| append_dot_mydomain = no | |
| readme_directory = no | |
| smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem | |
| smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key | |
| smtpd_use_tls=yes | |
| smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache | |
| smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache |
This file contains hidden or 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
| ^\+?\d(\s|\d)(\s|\d|\()(\s|\-|\d)\d(\s|\d)(\)|\s|\d|\-)(\s|\d)\d(\s|\d)?(\s|\d)?(\-|\d)?(\s|\d)?(\s|\d)?(\-|\d)?\d?\d?$ |
This file contains hidden or 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
| upstream backend { | |
| server localhost:8222; | |
| } | |
| server { | |
| listen 80; | |
| listen 443; | |
| server_name subdomain.example.com; | |
| return 301 $scheme://example.com$request_uri; |
This file contains hidden or 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 | |
| # mys.bash | |
| # Usage ./mys.bash some.deb | |
| if [[ -z "$1" ]]; then | |
| echo -e "\n\tUsage:\n\t ./mys.bash some.deb\n" | |
| exit 1 | |
| fi | |
| DEB=$1 |
This file contains hidden or 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
| Solution | |
| You can fix the issue by setting the locale to en_US.UTF-8 for example: | |
| $ export LANGUAGE=en_US.UTF-8 | |
| $ export LANG=en_US.UTF-8 | |
| $ export LC_ALL=en_US.UTF-8 | |
| $ locale-gen en_US.UTF-8 | |
| $ dpkg-reconfigure locales |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name domain.io www.domain.io; | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; |
This file contains hidden or 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 | |
| # publisher.sh | |
| # The script send email notification in case someone | |
| # published changes in /project/html repository | |
| export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/dell/srvadmin/bin:/home/user/bin | |
| REPO="/project/html" | |
| TMPD="/project/tmp" | |
| LASTFNAME="last_revision.txt" |
This file contains hidden or 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 | |
| # backup.bash | |
| PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
| TODAY="$(date +%Y)/$(date +%m)" | |
| DAY=$(date +%d-%m-%Y) | |
| TIME=$(date +%F_%H:%M:%S) | |
| ALL="/home/BACKUPS" | |
| SITES="${ALL}/sites/${TODAY}" |
OlderNewer