Author Archives: Vitalijus Ryzakovas

Unbound

Unbound is a free, open-source, recursive, and validating DNS caching server. It uses DNS-over-TLS and DNS-over-HTTPS to encrypt connections between clients. Compared to Bind9, Unbound is lightweight and extremely fast.

elasticsearch delete index older than

bash script rotate-elasticsearch-index.sh
should to change regDate=”$yearReg\\-$monthReg\\-$dayReg” to match your index date format

curl -X PUT “localhost:9200/test_2022-08-02-test?pretty”
{
“acknowledged” : true,
“shards_acknowledged” : true,
“index” : “test_2022-08-02-test”
}

./rotate-elasticsearch-index.sh test localhost:9200 1
=== Fri Aug 12 16:35:37 EEST 2022 ===
——————————————-
INFO: Index: test_2022-08-11-110602
INFO: Found date: 2022-08-11
INFO: test_2022-08-11-110602 is less than 1 days old, doing nothing.
——————————————-
INFO: Index: test_2022-08-12-110602
INFO: Found date: 2022-08-12
INFO: testas_2022-08-12-110602 is less than 1 days old, doing nothing.
——————————————-
INFO: Index: test_2022-08-02-test
INFO: Found date: 2022-08-02
DELETE: test_2022-08-02-test is about to be deleted.

Dockerfile icecoder

FROM php:7.4.10-apache

MAINTAINER ICEcoder <[email protected]>

ENV DEBIAN_FRONTEND noninteractive

RUN a2enmod rewrite
RUN a2enmod ssl
RUN service apache2 restart

RUN apt-get update && \
apt-get install unzip -y && \
apt-get clean all && \
curl -o /icecoder.zip 'https://downloads.icecoder.net/ICEcoder-8.1.zip' && \
unzip -q /icecoder.zip -d /tmp/ && \
cp -r /tmp/ICE* /var/www/html/icecoder && \
echo "<!DOCTYPE html>\n<html>\n<head>\n<title>Welcome to your new site</title>\n</head>\n<body style=\"text-align: center; font-family: monospace\">\n<h1>Welcome!</h1>\n<p>Head to ICEcoder at <a href=\"/icecoder\">localhost:8080/icecoder</a> to create a password and start coding!</p>\n</body>\n</html>" > /var/www/html/index.php && \
chown -R www-data.www-data /var/www/html && \
chmod 755 /var/www/html && \
rm -rf /icecoder.zip /tmp/ICE*

monit rabbitmq

check process rabbitmq-server matching "/usr/lib/erlang/erts-6.2/bin/beam"
group rabbitmq
start program = "/etc/init.d/rabbitmq-server start"
stop program = "/etc/init.d/rabbitmq-server stop"
if failed port 5672 type tcp then restart
if 3 restarts within 3 cycles then timeout