Example #1
0
    def on_after_upload(self):
        for src, dst in self._shares:
            dst = dst % self.folders

            dir.ensure(posixpath.dirname(src), recursive=True)
            dir.ensure(dst, recursive=True)
            file.link(dst, src)
Example #2
0
def site_enable(site):
    site_available = '/etc/nginx/sites-available/%s' % site
    site_enabled = '/etc/nginx/sites-enabled/%s' % site

    with ctx.sudo():
        file.link(site_available, site_enabled)
        reload()
Example #3
0
def _store_root_cnf(password):
    cnf_config = """# Config generated by revolver
[client]
host = localhost
user = root
password = %s
""" % password
    cnf_dir = "/etc/mysql/"
    cnf_file = cnf_dir + "root.cnf"

    if file.exists(cnf_file):
        return

    with ctx.sudo():
        file.write(cnf_file, cnf_config)
        file.link(cnf_file, "/root/.my.cnf")
Example #4
0
def _store_root_cnf(password):
    cnf_config = """# Config generated by revolver
[client]
host = localhost
user = root
password = %s
""" % password
    cnf_dir = "/etc/mysql/"
    cnf_file = cnf_dir + "root.cnf"

    if file.exists(cnf_file):
        return

    with ctx.sudo():
        file.write(cnf_file, cnf_config)
        file.link(cnf_file, "/root/.my.cnf")
Example #5
0
def _symlink_release(owner, current_dir, release_dir):
    with ctx.sudo(owner):
        if dir.exists(current_dir):
            dir.remove(current_dir, recursive=True)
        file.link(release_dir, current_dir)
Example #6
0
 def _activate(self):
     file.link(self.folders["releases.current"], self.folders["current"])
Example #7
0
 def _activate(self):
     file.link(self.folders["releases.current"], self.folders["current"])