Skip to content

Commit

Permalink
bin: Add memlimit
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Jul 11, 2023
1 parent a8e8b05 commit b47cbc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bin/memlimit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

: "${LIMIT:=256M}"

exec systemd-run --user -t -p MemoryMax="$LIMIT" -p WorkingDirectory="$(pwd)" -- "$@"
2 changes: 1 addition & 1 deletion bin/upload-photos
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ session_name=photo-upload-"$RANDOM"
# shellcheck disable=SC2140
escaped_photo_dir=${photo_dir/"'"/"'\\''"}

limit_cmd="systemd-run --user -t -p MemoryMax=512M -p WorkingDirectory=\"$(pwd)\" --"
limit_cmd=memlimit

if (( WOTOU_REMOTE )); then
host=wotou-ext
Expand Down

0 comments on commit b47cbc3

Please sign in to comment.