def __turn_on_rsync(self): self.tracewriter.symlink(sh.joinpths(self.cfgdir, RSYNC_CONF), '/etc/rsyncd.conf') sh.replace_in_file('/etc/default/rsync', 'RSYNC_ENABLE=false', 'RSYNC_ENABLE=true', run_as_root=True)
def pre_uninstall(self): sh.umount(sh.joinpths(self.datadir, DEVICE_PATH)) sh.replace_in_file('/etc/default/rsync', 'RSYNC_ENABLE=true', 'RSYNC_ENABLE=false', run_as_root=True)