From 9631e2955e6a07c4d651688dbe3bb1d2b06037c1 Mon Sep 17 00:00:00 2001 From: Merrick Date: Thu, 20 Aug 2020 09:02:44 -0400 Subject: [PATCH] Finished project --- print.sh | 7 +++++++ upload.php | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 print.sh diff --git a/print.sh b/print.sh new file mode 100644 index 0000000..39b37db --- /dev/null +++ b/print.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +cd /var/www/html/uploads +f=$(ls) +lp -d DCPL2550DW -o fit-to-page $f +rm -f $f + diff --git a/upload.php b/upload.php index d6bb4b7..db2a35b 100644 --- a/upload.php +++ b/upload.php @@ -13,4 +13,7 @@ if (!empty($_FILES)) { move_uploaded_file($tempFile, $targetFile); //6 -} \ No newline at end of file + sleep(1); + shell_exec('print.sh'); + +}