Merge branch '2.4' of github.com:MISP/MISP into 2.4

pull/4421/head
iglocska 2019-03-06 08:10:03 +01:00
commit 124be4103d
2 changed files with 23 additions and 1 deletions

22
app/Console/worker/stop.sh Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# TODO: Put some logic inside if many worker PIDs are detected
# Extract base directory where this script is and cd into it
cd "${0%/*}"
# Set to the current webroot owner
WWW_USER=$(ls -l ../cake |awk {'print $3'}|tail -1)
# In most cases the owner of the cake script is also the user as which it should be executed.
if [[ "$USER" != "$WWW_USER" ]]; then
echo "You run this script as $USER and the owner of the cake command is $WWW_USER. This might be an issue."
fi
# Check if run as root
if [[ "$EUID" -eq "0" ]]; then
echo "Please DO NOT run the worker script as root"
exit 1
fi
../cake CakeResque.CakeResque stop --all

View File

@ -3,7 +3,7 @@
echo '<h2>' . __('Scheduled Tasks') . '</h2>';
echo '<p>' . __('Here you can schedule pre-defined tasks that will be executed every x hours. You can alter the date and time of the next scheduled execution and the frequency at which it will be repeated (expressed in hours). If you set the frequency to 0 then the task will not be repeated. To change and of the above mentioned settings just click on the appropriate field and hit update all when you are done editing the scheduled tasks.') . '</p>';
echo '<p class="red bold">' . __('Warning: Scheduled tasks come with a lot of caveats and little in regards of customisations / granularity. You can instead simply create cron jobs out of the console commands as described here: ');
echo '<a href="' . $baseurl . '/events/automation/#console_tasks">' . __('Automating certain console tasks') . '</a>' . '</p>';
echo '<a href="' . $baseurl . '/events/automation/#console_admin_tasks">' . __('Automating certain console tasks') . '</a>' . '</p>';
?>
<div class="pagination">
<ul>