Fix background process

This commit is contained in:
Dmitri Popov
2019-02-16 17:18:50 +01:00
parent a45191545d
commit 4836a7c60d

View File

@@ -57,15 +57,15 @@
<?php
if (isset($_POST['cardbackup']))
{
shell_exec('sudo ./card-backup.sh 2>&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 <a href="https://gumroad.com/l/linux-photography">Linux Photography</a> book