Chapter 4. Scripts

Table of Contents
4.1. Installation
4.2. List of available scripts
4.3. Description and configuration
4.3.1. lms-notify
4.3.2. lms-notify-sms
4.3.3. lms-cutoff
4.3.4. lms-payments
4.3.5. lms-traffic
4.3.6. lms-traffic-logiptables
4.3.7. lms-makedhcpconf
4.3.8. lms-makeiptables, lms-makeipchains
4.3.9. lms-etherdesc
4.3.10. lms-sendinvoices
4.3.11. lms-makemacs
4.3.12. lms-makehosts
4.3.13. lms-makewarnings
4.3.14. lms-makemessages
4.3.15. lms-fping
4.3.16. lms-rtparser

4.1. Installation

Configuration of each Perl script should be enclosed in appropriate section of lms.ini file. Scripts should be taken from lms/bin/ directory and placed in /usr/sbin. After the move, you have to include them in your crontab, so that they will be executed automatically, which is probably what you want to do.

For example crontab entry which will execute lms-payments script each day one minute after midnight should take a form of:

1 0 * * *       /usr/sbin/lms-payments 1 > /dev/null

You should read man crontab to learn how to exactly schedule your scripts.

Most LMS scripts have following command line options:

-C file     location and name of alternative configuration, default: /etc/lms/lms.ini
-q          run script without any output
-h          help (usually list of valid command line options)
-v          information about script version