File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,15 @@ function main()
15
15
" ${appFolderPath} /../../../cookbooks/nginx/recipes/install-from-source.bash"
16
16
" ${appFolderPath} /../../../cookbooks/node-js/recipes/install.bash"
17
17
18
- addUserToSudoWithoutPassword " ${firstLoginUser} "
19
- autoSudo " ${firstLoginUser} " ' .bashrc'
20
-
21
18
setupRepository
22
19
updateRepositoryOnLogin " $( whoami) "
23
20
24
- addUserAuthorizedKey " ${firstLoginUser} " " ${firstLoginUser} " " $( cat " ${appFolderPath} /../files/authorized_keys" ) "
21
+ if [[ " $( existUserLogin " ${firstLoginUser} " ) " = ' true' ]]
22
+ then
23
+ addUserToSudoWithoutPassword " ${firstLoginUser} "
24
+ autoSudo " ${firstLoginUser} " ' .bashrc'
25
+ addUserAuthorizedKey " ${firstLoginUser} " " ${firstLoginUser} " " $( cat " ${appFolderPath} /../files/authorized_keys" ) "
26
+ fi
25
27
26
28
cleanUpSystemFolders
27
29
resetLogs
Original file line number Diff line number Diff line change @@ -17,13 +17,15 @@ function main()
17
17
" ${appFolderPath} /../../../cookbooks/vim/recipes/install.bash"
18
18
" ${appFolderPath} /../../../cookbooks/vmware-tools/recipes/install.bash"
19
19
20
- addUserToSudoWithoutPassword " ${firstLoginUser} "
21
- autoSudo " ${firstLoginUser} " ' .bashrc'
22
-
23
20
setupRepository
24
21
updateRepositoryOnLogin " $( whoami) "
25
22
26
- addUserAuthorizedKey " ${firstLoginUser} " " ${firstLoginUser} " " $( cat " ${appFolderPath} /../files/authorized_keys" ) "
23
+ if [[ " $( existUserLogin " ${firstLoginUser} " ) " = ' true' ]]
24
+ then
25
+ addUserToSudoWithoutPassword " ${firstLoginUser} "
26
+ autoSudo " ${firstLoginUser} " ' .bashrc'
27
+ addUserAuthorizedKey " ${firstLoginUser} " " ${firstLoginUser} " " $( cat " ${appFolderPath} /../files/authorized_keys" ) "
28
+ fi
27
29
28
30
cleanUpSystemFolders
29
31
resetLogs
You can’t perform that action at this time.
0 commit comments