How to modify text messages in SolusVM?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to modify text messages in SolusVM? For example warnings about blacklist.

Answer

All text messages are located on the Master node in two directories:

Text messages for clients - /usr/local/solusvm/language/client/<required_language>.lang.txt

Text messages for resellers - /usr/local/solusvm/language/reseller/<required_language>.lang.txt

For example - to change message regarding blacklist for clients with English locale:

  1. Access Master node over SSH.

  2. Open file /usr/local/solusvm/language/client/English.lang.txt.

  3. Find the required message and edit it:

    original:

    CONFIG_TEXT: $_lang["loginblacklist"] = "You Have Been Blacklisted - Contact Support";

    edited:

    CONFIG_TEXT: $_lang["loginblacklist"] = "You Have Been Blacklisted - Contact Service Provider";

Language files are replaced with each SolusVM update - as a workaround to make changes to them persisted - create a cron task that automatically rewrites them.

Example of workaround
  1. Create a copy of the modified file:

    # cp -a /usr/local/solusvm/language/reseller/English.lang.txt{,.copy}

  2. Create an hourly cronjob that will be replacing files:

    # vi /etc/cron.d/replace_file
    SHELL=/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO=root
    HOME=/
    0 * * * * root yes | cp -a /usr/local/solusvm/language/reseller/English.lang.txt{.copy,}

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.