Issue: Application that should not have been running had been started using monit and then stopped using monit.
Heisenberg - Digital Alchemist, Software Architect, Automation Specialist and Mechanical Engineer.
Labels
Wednesday, 21 April 2021
Tuesday, 20 April 2021
Berkeley DB db.h is missing
I go this error while trying to configure gnucobol but I have seen it before somewhere, just cant for the life of me remember where. anyway, a solution is to install the following;
libdb-dev
Saturday, 17 April 2021
HTML date picker
<input type="date" id="start" name="trip-start"
value="2018-07-22"
min="2018-01-01" max="2018-12-31">
Friday, 9 April 2021
Monday, 5 April 2021
To dump query result to a file from commandline
If we want to save the output from a MySQL session to a file, we can do this by adding the following to the end of the query;
INTO OUTFILE '/tmp/myresults.csv';
Friday, 26 March 2021
Monday, 22 March 2021
Trac on Slackware
Installation script for installing trac and it's dependencies on Slackware
Get it here: here
Note, you will need the rc.trac script, also from the above.
Thursday, 18 March 2021
Wednesday, 10 March 2021
Execute a shell command from php
To execute a shell command from php, typically do the following;
<?php
$output = shell_exec('sudo -u root monit summary');
echo "<pre>$output</pre>";
?>
In the above scenario, we want to run something as root, so we need to modify our /etc/sudoers file;
Firstly, assuming the user is www-data then we can add the following line to /etc/sudoers
www-data ALL = NOPASSWD: /usr/sbin/monit
where /usr/sbin/monit is the command that we wish to allow the user www-data to run without the need to enter a password.
Friday, 26 February 2021
Restart Network Manager
sudo systemctl restart network-manager