How to automatically restart Nginx

Here is instruction how to launch Nginx server after close unexpectedly. 1. Create /root/nginxfix.sh file with next content: #!/bin/bash PATH=/usr/sbin:/usr/bin:/sbin:/bin if [[ ! “$(/etc/init.d/nginx status)” =~ “active (running)” ]] then echo $(date -u) “NGINX server has been stopped. It has now been restarted.” service nginx start fi 2. Make it Read more…

How to fix Attempting to renew cert from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: Problem binding to port 443: Could not bind to IPv4 or IPv6.. Skipping.

Issue: Attempting to renew cert from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: Problem binding to port 443: Could not bind to IPv4 or IPv6.. Skipping. How to fix: Just stop webserver before renew letsencrypt. sudo service nginx stop cd letsencrypt sudo ./letsencrypt-auto renew sudo service nginx start

ProgressArcView implementation for Android

Would you like the same progress View? Here is source code for simple viewsion without customisation from XML. package com.hrupin.samples.roundanimation; import android.content.Context; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.os.Bundle; import android.os.Parcelable; import android.util.AttributeSet; import android.view.View; /** * Created by Igor Khrupin www.hrupin.com on 03-05-2017. */ Read more…