From 4836a7c60d4988392afdc7e7a2066a9fbea27390 Mon Sep 17 00:00:00 2001 From: Dmitri Popov Date: Sat, 16 Feb 2019 17:18:50 +0100 Subject: [PATCH] Fix background process --- scripts/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/index.php b/scripts/index.php index 9fd6775..181db64 100644 --- a/scripts/index.php +++ b/scripts/index.php @@ -57,15 +57,15 @@ &1 & echo $!'); + shell_exec('sudo ./card-backup.sh > /dev/null 2>&1 & echo $!'); } if (isset($_POST['camerabackup'])) { - shell_exec('sudo ./camera-backup.sh 2>&1 & echo $!'); + shell_exec('sudo ./camera-backup.sh > /dev/null 2>&1 & echo $!'); } if (isset($_POST['minidlna'])) { - shell_exec('sudo ./minidlna.sh 2>&1 & echo $!'); + shell_exec('sudo ./minidlna.sh > /dev/null 2>&1 & echo $!'); // folder to check $dir = '/media/storage'; @@ -103,7 +103,7 @@ } if (isset($_POST['shutdown'])) { - shell_exec('sudo shutdown -h now 2>&1 & echo $!'); + shell_exec('sudo shutdown -h now > /dev/null 2>&1 & echo $!'); } ?> Read the Linux Photography book