Skip to content

Commit 02eb0fe

Browse files
committed
Use the current user variable
This helps if the default user is `ubuntu`, for example. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent b7460a1 commit 02eb0fe

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

0.initial-setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ RES=scripts
66

77
rm -rf output
88
mkdir output
9-
chown -R ec2-user:ec2-user output
9+
USR=${SUDO_USER:-$USER}
10+
chown -R $USR. output
1011

1112
pushd $RES > /dev/null
1213

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ Raise the maximum processes limit.
3131

3232
```bash
3333
sudo tee -a >> /etc/security/limits.conf <<EOL
34-
ec2-user soft nproc 16384
35-
ec2-user hard nproc 16384
34+
$USER soft nproc 16384
35+
$USER hard nproc 16384
3636
EOL
3737
```
3838

39-
Note: In the above configuration, `ec2-user` is a
40-
placeholder for the ec2 instance logged-in user.
39+
Note: In the above configuration, `$USER` expands
40+
to the ec2 instance logged-in user.
4141

4242
Reload the ssh session to have the new limit applied.
4343

0 commit comments

Comments
 (0)