Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3540184
D4477.id14284.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
821 B
Referenced Files
None
Subscribers
None
D4477.id14284.diff
View Options
diff --git a/keyserver/bash/deploy.sh b/keyserver/bash/deploy.sh
--- a/keyserver/bash/deploy.sh
+++ b/keyserver/bash/deploy.sh
@@ -10,13 +10,13 @@
MAX_DISK_USAGE_KB=3145728 # 3 GiB
# The user that spawns the Node server
-DAEMON_USER=comm
+DAEMON_USER="comm"
# Input to git clone
GIT_CLONE_PARAMS=https://github.com/CommE2E/comm.git
set -e
-[[ `whoami` = root ]] || exec sudo su -c "$0 $1"
+[[ $(whoami) = root ]] || exec sudo su -c "$0 $1"
# STEP 1: clone source into new directory
CHECKOUT_PATH=$1.$(date +%F-%H-%M)
@@ -48,7 +48,7 @@
if [[ "$checkout" = "$CHECKOUT_PATH" ]]; then
break
fi
- TOTAL_USAGE=$(sudo du -cs $1* | grep total | awk '{ print $1 }')
+ TOTAL_USAGE=$(sudo du -cs "$1"* | awk '/total/ { print $1 }')
if [[ $TOTAL_USAGE -le $MAX_DISK_USAGE_KB ]]; then
break
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 4:36 AM (7 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2710485
Default Alt Text
D4477.id14284.diff (821 B)
Attached To
Mode
D4477: [keyserver] Clean up `deploy.sh`
Attached
Detach File
Event Timeline
Log In to Comment