Open the aliases in the text editor:
Continue reading “Redirecting mail for the root user”Author Archives: Vyacheslav
Installing Metamod on Linux
Metamod – a module that allows to extend the capabilities of the HLDS server, it intercepts calls to functions and transmits data to other plug-ins.
For example, I will install it on the server Counter-Strike 1.6.
Let’s go to the directory cstrike and create the necessary folders:
cd ~/hlds/cstrike mkdir addons cd addons mkdir metamod cd metamod mkdir dlls cd dlls
Download the archive from Metamod and unpack it:
wget https://ixnfo.com/wp-content/uploads/2016/12/metamod-p-1.21p37-linux_i686.tar.gz tar -zxvf metamod-p-1.21p37-linux_i686.tar.gz
Create the plugins.ini file:
cd ~/hlds/cstrike/addons/metamod touch plugins.ini
Open the file liblist.gam in the text editor (in the nano editor, press Ctrl+X to exit, y or n, then Enter to save or discard the changes:
cd ~/hlds/cstrike nano liblist.gam
Add at the end of the line:
gamedll_linux "addons/metamod/dlls/metamod.so"
Done, Metamod is installed, the server can be rebooted.
In order to connect nosteam clients to the server, you can install Dproto as well.
A new version of Metamod can be found here http://metamod-p.sourceforge.net
Asterisk time based routing
Here is an example of routing calls over time in Asterisk.
Assume that the /etc/asterisk/extensions.conf file has a configured context for the trunk with the following parameters:
[Trunk_2] exten => s,1,DIAL(SIP/6004&SIP/6003,19) exten => s,2,Hangup()
And to resolve the time calls to different phones, we will point out for the context of this trunk only nested contexts:
[Trunk_2] include => daytime,8:00-18:00,mon-sat,*,* include => nighttime,18:00-8:00,mon-sun,*,* include => sunday,8:00-22:00,sun,*,*
In fact, daytime, nighttime, sunday are only the names of contexts for which the time is written in the context of [Trunk_2], they can be called anything.
And then in these separate contexts we will already add the necessary extensions.
That is, in the afternoon:
[daytime] exten => s,1,DIAL(SIP/6004&SIP/6003,19) exten => s,2,Hangup()
At night:
[nighttime] exten => s,1,DIAL(SIP/6002,19) exten => s,2,Hangup()
And on Sunday:
[sunday] exten => s,1,DIAL(SIP/6002,19) exten => s,2,Hangup()
You can also, for example, create a holiday context with holidays:
include => holiday,*,*,1,jan include => holiday,*,*,8,mar
etc.
For those who want to paint more in detail by day, I’ll give you a list of days in English:
mon – Monday
tue – Tuesday
wed – Wednesday
thu – Thursday
fri – Friday
sat – Saturday
sun – Sunday
Similarly, up to three letters and names of months are shortened.
Ubiquiti Zabbix templates
I sketched a small template for the client stations (and other devices in the station mode), displaying the level of the signal (with the trigger at a low level), traffic, auto-filling in the network node’s inventory – frequency, SSID AP, WLAN MAC, etc.
In the template, the group “Wi-Fi equipment” needs to be changed to the desired one (it is possible to use the standard Templates), and also specify the correct SNMP community instead of “COMMUNITY”.
Download Zabbix template Ubiquiti Client Station
Recovering GRUB Linux
Usually on each disk there is an MBR (master boot record) and when the computer is turned on, the BIOS accesses it for information for further download. On Linux systems, GRUB is used as the boot loader, I will write about the recovery options of which below.
You can see the version of GRUB using the command:
grub-install --version
1) First option.
We start the system with LiveCD/USB, for example in the Ubuntu Desktop image, in addition to the installation, it is possible to start the system.
Open the terminal, for this press Alt+F2 and enter the command:
gnome-terminal
Updating the GI Matrix Lite’s firmware
There are several options for updating the GI Matrix Lite firmware:
1) Using USB flash drive
2) From the computer through the RS-232 port
3) From the Master receiver to the Slave receiver through the RS-232 ports
4) Through the Internet
5) From the satellite
On the test I will give an example of updating the firmware using a USB stick.
First of all we make a backup copy of the firmware by connecting the USB flash drive to the receiver and selecting MENU – System – Save to USB – OK
And also save the keys MENU – Conditional access – CA setting – Edit keys – press the green button, after that the file mcaskey.bin appears on the flash drive.
So:
1) Download the latest firmware from the Internet or for example from here
https://files.ixnfo.com/Firmware/GI_Matrix_lite/ALI3612_0E060B00_galaxy_140_combo_official_synaps_1CA_0CI_1.5.69.rar
2) Unpack the firmware file from the archive if it is in it and copy it to a USB flash drive, then connect the USB flash drive to the receiver.
3) Open MENU – System – Update via USB, select the firmware file, select the update type, then Start and OK.
At the end, the receiver will reboot itself.
At the time of updating, you can not turn off the power of the receiver or turn off the USB flash drive.
Configuring Cron Jobs in cPanel and WHM
Cron jobs are added separately for each user through the cPanel and WHM web interface, namely cPanel “Advanced” -> “Cron Jobs“.
Through the WHM panel “Home” -> “Server Configuration” -> “Configure cPanel Cron Jobs“.
But there are also system tasks that can not be seen through the panel.
They can be seen by connecting through SSH to the server and running the command from the root user:
crontab -e
or from another user via sudo:
sudo crontab -e
In the nano editor, the shortcut Ctrl+X is used to exit, and y/n to save or discard the changes.
The file itself with the tasks is located on the path /var/spool/cron/root
If an annoying report is sent to an e-mail when executing an assignment, you can hide the output of the task by adding the following code to the end of the command:
>/dev/null 2>&1
To restart the Cron service, use the command:
service crond restart
See also a similar article: Using and configuring CRON
Configure ProFTPd using the MySQL user database
Let’s say there is a ProFTPd server installed, for example, as I described in this article – Installing and Configuring ProFTPd in Ubuntu
And also installed MySQL server, for example, as I described in this article – Installing and configuring a MySQL server on Ubuntu
Here is an example of setting up ProFTPd using the MySQL user database.
Continue reading “Configure ProFTPd using the MySQL user database”
Installing Webalizer
Webalizer – a program for reporting and statistics on log files.
Let’s say there is an installed Apache2 web server, for example, as I described in this article – Installing and Configuring the Apache2 Web Server
Installing and Configuring ProFTPd in Ubuntu
ProFTPd — FTP-server for Linux and UNIX-like operating systems.
Continue reading “Installing and Configuring ProFTPd in Ubuntu”