Group Details Private


Member List

  • RE: Rsync with cron that will only run if another rsync isn't already running..

    I would go with rsync daemon and inotifywait both in daemon mode or executed via rc.local.
    The source machine would run rsync with necessary flags, watch for new files & transfer files from path/s, on other end intoifywait utility would watch for close_write and you can easily script email functionality on close_write so that you know when the transfer completed.

    posted in #! Request Script #!
  • Rsync with cron that will only run if another rsync isn't already running..

    Hi to All,

    I want to create crontab in order to run a script that backs up my local files to my remote server. The problem is that if there are too many files to transfer (Example: I ripped a DVD in the last hour) the actual backup may take longer than 60 minutes. So I want to make script to check if my backup script, based on rsync, is running. If rsync is still running then do nothing and exit the script. If it is not running, execute the script as normal.If the specific rsync finished with success , then send an email.

    Any help is much appreciated. Many thanks..

    posted in #! Request Script #!
  • RE: Problem with Postfix // iRedmail configuration

    Hello again,

    I have found a temporary solution as per below. The email accounts that i want to use , only for internal purposes, added into a specific class (internal_only). All the other domain- account, can send to external emails. Don't forget to postmap interna_senders & internal domain.

    smtpd_sender_restrictions =

    check_sender_access hash:/etc/postfix/internal_senders





    check_sender_access pcre:/etc/postfix/sender_access.pcre

    smtpd_restriction_classes = internal_only

    internal_only = check_recipient_access hash:/etc/postfix/internal_domain reject

    posted in General Discussion
  • Problem with Postfix // iRedmail configuration

    Hi guys,

    I have a Centos 7 which has an iRedmail web mail server in order the users to send local email each-other The Postfix has configured in order to send mail to internal users not external, as the below. My question is how to configure postfix to send email outside (External) from one specific domain. For example:

    I have create a domain at iRedmail with multiple email addresses ([email protected],[email protected] etc).My question is how to allow this specific domain ( to send to external emails.

    vim /etc/postfix/
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain = $myhostname
    broken_sasl_auth_clients = yes
    smtpd_sasl_security_options = noanonymous

    smtpd_recipient_restrictions =

    myhostname = localhost
    mydomain = localdomain
    mydestination = $myhostname, localhost.$mydomain, localhost

    default_transport = error:outside mail is not deliverable

    posted in General Discussion
  • NodeMCU MQ135 air quality sensor tutorial


    Before we begin, you will have to obtain:

    Import Library

    Arduino > Sketch > Include Library > Add .ZIP library (Select the MQ135 Library zip file that you have downloaded from above)

    Connect the NodeMCU to MQ135 sensor

    Connect NodeMCU A0 to MQ135 AO
    Connect NodeMCU GND to MQ135 GND
    Connect NodeMCU 3.3V to MQ135 VCC


    It is necessary to "burnout" the sensor for first use to calibrate proper rzero value, to do so paste following code to your arduino window :

    #include "MQ135.h"
    const int ANALOGPIN=0;
    MQ135 gasSensor = MQ135(ANALOGPIN);
    void setup(){
      Serial.begin(115200);      // sets the serial port to 115200
    void loop(){
      float rzero = gasSensor.getRZero();
    • Upload the code to NodeMCU
    • Open the serial monitor : Tools > Serial Monitor

    Let it running for an hour or two until you get constant rzero value. Write down that RZERO value as you will need it for later use.

    If you made it up to here, you almost got to the end.


    This is the platform that we are going to use to store our measures and display them in a nice graph that we can embed to any website or similar. (This tutorial might expand in future to a selfhosted variant of storing and displaying data)

    Measure Air Quality

    Adapt following code to reflect your RZERO value, API key, SSID and password.

    Note: RZERO is the value from the burnout section.

    #include <ESP8266WiFi.h>
    #include "MQ135.h"
    #define RZERO 76.63
    const int ANALOGPIN=0;
    MQ135 gasSensor = MQ135(ANALOGPIN);
    String apiKey = "WRITE-API-KEY"; // Enter your Write API key from ThingSpeak
    const char *ssid = "SSIDNAME"; // replace with your wifi ssid 
    const char *pass = "PASSWORDHERE"; // replace this field with your password
    const char* server = "";
    WiFiClient client;
    void setup()
    Serial.println("Connecting to ");
    WiFi.begin(ssid, pass);
    while (WiFi.status() != WL_CONNECTED)
    Serial.println("WiFi connected");
    void loop()
      float ppm = gasSensor.getPPM();
    if (client.connect(server, 80)) 
    String postStr = apiKey;
    postStr += "&field1=";
    postStr += String(ppm);
    postStr += "r\n";
    client.print("POST /update HTTP/1.1\n");
    client.print("Connection: close\n");
    client.print("X-THINGSPEAKAPIKEY: " + apiKey + "\n");
    client.print("Content-Type: application/x-www-form-urlencoded\n");
    client.print("Content-Length: ");
    Serial.print("Gas Level: ");
    Serial.println("Data Send to Thingspeak");
    // thingspeak needs minimum 15 sec delay between updates.

    That is it, from here you are sending values to ThingSpeak platform, you got yourself a nice graph, and you are monitoring air quality 🙂

    Here is the image of values to know when the air is bad :

    air quality

    posted in Tutorials
  • RE: Remote Live Backing up Custom Game Server With SQlite3 databases?

    @FriendlyGamer You can always adapt the script by changing .db to .sqlite, i will do it ASAP.

    Regarding the shared hosting/storage server, i am clueless what mechanism they are using as i do not know which panel they are using, have you checked their documentation ? You could raise a ticket with question to obtain necessary info... I just assume it is within options somewhere, some hostings generate public/private key pair for you to import to the server. Can you at least tell me which provider is that ? Maybe a link to their website?

    You can read your public key from the server with command cat ~/.ssh/

    By the way i have changed the script to reflect .sqlite extension. Since it is just a file, your db could be ending with .anything, so you can compare last commit and adapt it for future use 😉

    posted in #! Request Script #!
  • RE: Remote Live Backing up Custom Game Server With SQlite3 databases?


    I have updated the script to get all names of DBs in the directory path and backup them to specified directory.

    Check the script location :

    Regarding the remote storage, i suppose that you have to add your public key manually to the control panel and obtain parameters like server URL which you should input to the script in format [email protected]

    posted in #! Request Script #!
  • RE: Remote Live Backing up Custom Game Server With SQlite3 databases?


    1. Sorry i haven't saw it was about multiple databases, was probably too tired 🙂 . How many databases are there ? Are they all in same directory?

    2. I haven't mentioned that to be able to use rsync, most elegant way would be to copy your public key to remote server by issuing from game server ssh-copy-id [email protected]. In case you haven't generated public/private key, you can do so by issuing ssh-keygen -T RSA. I will update the readme on gitlab.

    Also it might be a good idea to determine "remote storage", is it another linux server? If not, what is it and what protocols does it support ?

    posted in #! Request Script #!