예제 #1
0
파일: __init__.py 프로젝트: j0057/fabric
def deb_install_systemd():
    "Install systemd and update grub config"
    if not deb.is_installed('systemd'):
        deb.package('systemd')
        with watch('/etc/default/grub') as etc_default_grub:
            sed('/etc/default/grub', 
                'GRUB_CMDLINE_LINUX_DEFAULT="quiet"', 
                'GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"')
        if etc_default_grub.changed:
            run('update-grub2')
            reboot()
            run('/bin/true')
예제 #2
0
파일: uwsgi.py 프로젝트: j0057/fabric
def uwsgi_install():
    'Install uWSGI from unstable'
    for pkg in ['uwsgi', 'uwsgi-plugin-python', 'uwsgi-plugin-python3']:
        if not deb.is_installed(pkg):
            deb.package(pkg + '/unstable')