Skip to content

Commit

Permalink
'initialize' command improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Oct 6, 2019
1 parent 98689ed commit 28f9222
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion webscaff/commands/proj/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from . import fs, django, service, uwsgi
from ..sys import usr, apt, git, venv, pip, pg, utils as sys_utils, certbot
from ..utils import echo


@task
Expand All @@ -14,9 +15,14 @@ def bootstrap(ctx):
project = ctx.project
project_home = ctx.paths.remote.project.home
me = usr.whoami(ctx)
group = project.group

usr.create(ctx, project.user)
usr.add_to_group(ctx, me, project.group)
just_added = usr.add_to_group(ctx, me, group)

if just_added:
echo(' * Initial preparation is done. Please rerun the command to proceed.')
return

apt.bootstrap(ctx)

Expand Down Expand Up @@ -55,6 +61,7 @@ def bootstrap(ctx):
certbot.bootstrap(ctx)
certbot.get_certificate(ctx)

echo('* Done. Reboot now ...')
sys_utils.reboot(ctx)


Expand Down

0 comments on commit 28f9222

Please sign in to comment.