Various fixes and improvements
This commit is contained in:
@@ -47,14 +47,14 @@
|
||||
<?php
|
||||
if (isset($_POST['cardbackup']))
|
||||
{
|
||||
shell_exec('sudo ./card-backup.sh');
|
||||
shell_exec('sudo ./card-backup.sh 2>&1 & echo $!');
|
||||
}
|
||||
if (isset($_POST['camerabackup']))
|
||||
{
|
||||
shell_exec('sudo ./camera-backup.sh');
|
||||
shell_exec('sudo ./camera-backup.sh 2>&1 & echo $!');
|
||||
}
|
||||
if (isset($_POST['shutdown']))
|
||||
{
|
||||
shell_exec('sudo shutdown -h now');
|
||||
shell_exec('sudo shutdown -h now 2>&1 & echo $!');
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
while :
|
||||
do
|
||||
if [[ ! $(pgrep php) ]]; then
|
||||
cd /home/$USER/little-backup-box/script/
|
||||
php -S localhost:8000
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user