summaryrefslogtreecommitdiff
path: root/includes/jobs/UpdateAssets.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/jobs/UpdateAssets.php')
-rw-r--r--includes/jobs/UpdateAssets.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/jobs/UpdateAssets.php b/includes/jobs/UpdateAssets.php
index 330a66c..c355a54 100644
--- a/includes/jobs/UpdateAssets.php
+++ b/includes/jobs/UpdateAssets.php
@@ -29,7 +29,7 @@ function downloadAssets($system, $path = null) {
$id = preg_replace("/^([\da-f]{8})-([\da-f]{4})-([\da-f]{4})-([\da-f]{4})-([\da-f]{12})$/", "$1$2$3$4$5", $general["uuid"]);
echo(" /avatars/$id.webp\n");
file_put_contents("/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION), file_get_contents($general['avatar_url']));
- exec("nice 19 convert -resize 512x512 \"" . "/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars/" . $id . ".webp");
+ exec("nice -n 19 convert -resize 512x512 \"" . "/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION));
}
@@ -37,7 +37,7 @@ function downloadAssets($system, $path = null) {
$id = preg_replace("/^([\da-f]{8})-([\da-f]{4})-([\da-f]{4})-([\da-f]{4})-([\da-f]{12})$/", "$1$2$3$4$5", $general["uuid"]);
echo(" /banners/$id.webp\n");
file_put_contents("/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION), file_get_contents($general['banner']));
- exec("nice 19 convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION) ."\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
+ exec("nice -n 19 convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION) ."\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION));
}
}
@@ -52,7 +52,7 @@ function downloadAssets($system, $path = null) {
if (isset($member["avatar_url"])) {
echo(" /avatars/$id.webp\n");
file_put_contents("/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION), file_get_contents($member['avatar_url']));
- exec("nice 19 convert -resize 512x512 \"" . "/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars/" . $id . ".webp");
+ exec("nice -n 19 convert -resize 512x512 \"" . "/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION));
}
@@ -60,7 +60,7 @@ function downloadAssets($system, $path = null) {
if (isset($member["banner"])) {
file_put_contents("/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION), file_get_contents($member['banner']));
- exec("nice 19 convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
+ exec("nice -n 19 convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION));
} else {
$img = imagecreate(2048, 1024);
@@ -73,7 +73,7 @@ function downloadAssets($system, $path = null) {
imagejpeg($img, "/tmp/img.jpeg", 100);
imagedestroy($img);
- exec("nice 19 convert -resize 2048x2048 \"/tmp/img.jpeg\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
+ exec("nice -n 19 convert -resize 2048x2048 \"/tmp/img.jpeg\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
unlink("/tmp/img.jpeg");
}
}
@@ -86,11 +86,11 @@ function downloadAssets($system, $path = null) {
$url = "" . $_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt.png";
}
echo(" /heads/$id.png\n");
- exec("nice 19 convert \"" . $url . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/heads/" . $id . ".png");
+ exec("nice -n 19 convert \"" . $url . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/heads/" . $id . ".png");
if (file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $member["id"] . ".png")) {
echo(" /bodies/$id.png\n");
- exec("nice 19 convert \"" . "" . $_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $member["id"] . ".png" . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/bodies/" . $id . ".png");
+ exec("nice -n 19 convert \"" . "" . $_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $member["id"] . ".png" . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/bodies/" . $id . ".png");
}
}
}